问题描述
上图:
具体描述
* What went wrong:
Execution failed for task ':react-native-picker:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
/Users/mac/.gradle/caches/transforms-2/files-2.1/a420ba9520bfa9f5513cd698fcec3b6a/appcompat-1.0.2/res/values-v28/values-v28.xml:5:5-8:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
/Users/mac/.gradle/caches/transforms-2/files-2.1/a420ba9520bfa9f5513cd698fcec3b6a/appcompat-1.0.2/res/values-v28/values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
/Users/mac/.gradle/caches/transforms-2/files-2.1/cd9b830ef1547edd7bbfe2164ba3891d/core-1.0.1/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/mac/.gradle/caches/transforms-2/files-2.1/cd9b830ef1547edd7bbfe2164ba3891d/core-1.0.1/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/ttcIndex not found.
解决方法
1、找到对应依赖 build.gradle 文件
把compileSdkVersion,targetSdkVersion都改为android所用的版本,把dependencies的compile改成implementation,再重新打包就不报错了
举个栗子:
比如我这个是
然后找到依赖里面的 build.gradle
旧:
改为
再重新打包就可以了