react-native-braintree-dropin-ui icon indicating copy to clipboard operation
react-native-braintree-dropin-ui copied to clipboard

Android: Failed to link resources

Open adamfellon opened this issue 5 years ago • 1 comments

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

adamfellon avatar Jun 25 '19 22:06 adamfellon

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.

kmcmanimen avatar Jul 12 '19 19:07 kmcmanimen