react-native-braintree-dropin-ui
react-native-braintree-dropin-ui copied to clipboard
Android: Failed to link resources
When trying to build on android I get this message.
Android resource linking failed
node_modules/react-native-braintree-dropin-ui/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
node_modules/react-native-braintree-dropin-ui/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
node_modules/react-native-braintree-dropin-ui/android/build/intermediates/res/merged/release/values/values.xml:4320: error: resource android:attr/fontVariationSettings not found.
node_modules/react-native-braintree-dropin-ui/android/build/intermediates/res/merged/release/values/values.xml:4321: error: resource android:attr/ttcIndex not found.
error: failed linking references.
dependencies in build.gradle
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 26
supportLibVersion = "28.0.0"
// uncomment to get google to work
googlePlayServicesAuthVersion = "15.0.1"
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.google.gms:google-services:4.0.1' // <--- use this version or newer
I was able to fix this temporarily by changing the android
section in android/build.gradle
within the react-native-braintree-dropin-ui
project to:
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
lintOptions {
warning 'InvalidPackage'
}
}
It should match the same info in your app's android/build.gradle
file.