-
Notifications
You must be signed in to change notification settings - Fork 32
"AAPT: error: resource android:attr/dialogCornerRadius not found" when building Android assets #47
Description
I'm getting the below error with the latest launch darkly react native SDK
To reproduce
From root of react native app, run cd android && ./gradlew assembleRelease
Expected behavior
I expect the android assets to build successfully
Logs
Execution failed for task ':launchdarkly-react-native-client-sdk:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> 1 exception was raised by workers:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
/Users/sliu/.gradle/caches/transforms-2/files-2.1/b223af57039658e6101987f96510dfd5/appcompat-1.0.2/res/values-v28/values-v28.xml:5:5-8:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
/Users/sliu/.gradle/caches/transforms-2/files-2.1/b223af57039658e6101987f96510dfd5/appcompat-1.0.2/res/values-v28/values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
/Users/sliu/.gradle/caches/transforms-2/files-2.1/d67585c7f2ea0d699d201615e94006d0/core-1.0.1/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/sliu/.gradle/caches/transforms-2/files-2.1/d67585c7f2ea0d699d201615e94006d0/core-1.0.1/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/ttcIndex not found.
SDK version
"3.1.0"
Language version, developer tools
OS/platform
macOS Catalina 10.15.4
Additional context
Not super familiar with gradle/Android build system but there seems to be an inconsistency in the versions being specified here. Your build.gradle references compile SDK 27 in one place and then 28 in another:
buildscript {
ext {
buildToolsVersion = "28.0.2"
minSdkVersion = 16
compileSdkVersion = 28 // <---------- different version below
targetSdkVersion = 27 // <---------- also why is target "27" here, shouldn't it also be 28?
supportLibVersion = "28.0.0"
}
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
}
}
apply plugin: 'com.android.library'
android {
compileSdkVersion 27 // <---------- different version above
If I change locally all compile and target SDK versions to 28, it fixes the error in my case.
Also, https://stackoverflow.com/a/50496385/522415 seems related...
Also, anecdotally, most react libraries I've inspected reference Android SDK version 28