在打包过程中 遇到:Execution failed for task ':react-native-icons:verifyReleaseResources'.,这是因为在项目中添加了第三防组件。这个问题原本不是rn版本的问题,原因是0.61.3将Android SDK的版本更新到28了,这与有些原生代码的插件不兼容了,因为第三方更新不及时,SDK还是旧的版本。
例如我遇到的是 react-native-icons版本问题 那么在rn项目中node_modules找到react-native-icons下android下的build.gradle文件改成新版的型号就好了。
1 android { 2 compileSdkVersion 28 3 buildToolsVersion "23.0.1" 4 5 defaultConfig { 6 minSdkVersion 16 7 targetSdkVersion 28 8 versionCode 1 9 versionName "1.0" 10 } 11 lintOptions { 12 abortOnError false 13 } 14 } 15 16 repositories { 17 mavenCentral() 18 } 19 20 dependencies { 21 implementation 'com.facebook.react:react-native:0.16.+' 22 }
把compileSdkVersion
,targetSdkVersion
都改为28,把dependencies的compile
改成implementation
,再重新打包就不报错了
© 著作权归作者所有
举报
相关热门文章
发表评论
0/200