Hey, Whenever I run ./gradlew assembleRelease I got this error:
Execution failed for task ':@react-native-community_async-storage:verifyReleaseResources'.
java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
/Users/darkkingmarvel/Desktop/Jiffeo/v2/jiffeoApp/node_modules/@react-native-community/async-storage/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
/Users/darkkingmarvel/Desktop/Jiffeo/v2/jiffeoApp/node_modules/@react-native-community/async-storage/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
/Users/darkkingmarvel/Desktop/Jiffeo/v2/jiffeoApp/node_modules/@react-native-community/async-storage/android/build/intermediates/res/merged/release/values/values.xml:2714: error: resource android:attr/fontVariationSettings not found.
/Users/darkkingmarvel/Desktop/Jiffeo/v2/jiffeoApp/node_modules/@react-native-community/async-storage/android/build/intermediates/res/merged/release/values/values.xml:2715: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Hey @Proxy08
What's your compileSdkVersion for your app?
here @Krizzu
buildToolsVersion = "27.0.3"
minSdkVersion = 19
compileSdkVersion = 27
targetSdkVersion = 27
supportLibVersion = "27.1.1"
Have you tried cleaning the Android build with /gradlew clean in the android folder? That fixed the problem for me.
@Proxy08
Have you tried to bump compileSdkVersion to 28?
Hi, I have the same problem with compileSdkVersion = 28.0.3, sync + build all OK and previous made ./gradlew clean
> Task :@react-native-community_async-storage:verifyReleaseResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':@react-native-community_async-storage:verifyReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
PATH_PROJECT\node_modules\@react-native-community\async-storage\android\build\intermediates\res\merged\release\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
PATH_PROJECT\node_modules\@react-native-community\async-storage\android\build\intermediates\res\merged\release\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
PATH_PROJECT\node_modules\@react-native-community\async-storage\android\build\intermediates\res\merged\release\values\values.xml:2714: error: resource android:attr/fontVariationSettings not found.
PATH_PROJECT\node_modules\@react-native-community\async-storage\android\build\intermediates\res\merged\release\values\values.xml:2715: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Finally, I solved it.
Steps:
1.12.1, so was mandatory update it. Now I have 1.15.2node_modules and reinstall it using yarn install / npm installsubprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 28 // have to match with build.gradle and app/build.gradle ones
buildToolsVersion '28.0.3' // have to match with build.gradle and app/build.gradle ones
variantFilter { variant ->
def names = variant.flavors*.name
// To check for a certain build type, use variant.buildType.name == "<buildType>"
if (names.contains("reactNative51") || names.contains("reactNative55") || names.contains("reactNative56")) {
// Gradle ignores any variants that satisfy the conditions above.
setIgnore(true)
}
}
}
}
}
}
Now ./gradlew assembleRelease works!
PD: don't forgive place the keystore file to android/app ;)
Hey @manelsanz, sorry for not getting back to you earlier.
I'm glad you got it working for you. By default, Async Storage picks compile/target SDK version from your root build.gradle, fallbacking to v28 when not successful.. I believe this was not somehow picked up in your project, maybe because of the setup.
Anyway, I'm closing this for now, feel free to reopen once it's needed again.
thanks.
I have same problem, I just say it maybe helpfull for someone
/gradlew clean and put sdk version to 28 is working,
I have this problem after update,
Thanks @Krizzu & @manelsanz
Solved for me @manelsanz , Thanks
Most helpful comment
Finally, I solved it.
Steps:
1.12.1, so was mandatory update it. Now I have 1.15.2node_modulesand reinstall it usingyarn install/npm installNow
./gradlew assembleReleaseworks!PD: don't forgive place the keystore file to
android/app;)