如何安全升级compileSdkVersion、targetSdkVersion到31
来源:8-6 H5混合开发详情模块(一)

慕尼黑0536602
2022-06-22
Hi 老师,
由于业务需要,我需要在我的React Native app 里添加一个信用卡付款功能,这里我需要stripe …
然后这里边需要添加一个library ,然后要求compileSdkVersion和targetSdkVersion都需要达到31:
https://github.com/stripe/stripe-react-native;
我的是:
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "21.4.7075529"
androidXCore = "1.7.0"
facebookSdkVersion = “13.1.0”
}
windows 10 ,
react -natve version:“0.67.4”
我尝试直接修改数字从30改成31,结果直接报以下错:
- What went wrong:
Execution failed for task ‘:app:processDebugMainManifest’.
Manifest merger failed : Apps targeting Android 12 and higher are required to specify an explicit value for
android:exported
when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
我根据这个错误上网找了以下,满大街都是Andoird Strudio的解决方法,就是在Manifest 中添加android:exported=“true” ;我试了一下在React Native 运用,结果报错是无效的。
特此向您请教应该怎么做。非常感谢!!!
1回答
-
建一个新的rn项目,然后将你的js代码迁移过去。012022-06-24
相似问题