1

When running react-native run-android it throws me the following error:

/Users/waltermonecke/Code_Projects/reactNative/lisdo/android/app/build/intermediates/res/merged/debug/values-v24/values-v24.xml:3: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

/Users/waltermonecke/Code_Projects/reactNative/lisdo/android/app/build/intermediates/res/merged/debug/values-v24/values-v24.xml:4: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.

/Users/waltermonecke/Code_Projects/reactNative/lisdo/android/app/build/intermediates/res/merged/debug/values-v24/values-v24.xml:3: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

/Users/waltermonecke/Code_Projects/reactNative/lisdo/android/app/build/intermediates/res/merged/debug/values-v24/values-v24.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.

I thought this error was related to this question about the build version SDK, but I have tried everything with no success.

I have been going on for about 6 hours and really need some help.

build.gradle:

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
    applicationId "com.lisdo"
    minSdkVersion 16
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
    ndk {
        abiFilters "armeabi-v7a", "x86"
    }
...
}

dependencies {
compile project(':react-native-google-places')
compile project(':react-native-fetch-blob')
compile project(':react-native-image-picker')
compile project(':react-native-vector-icons')
compile project(':react-native-fbsdk')
compile project(':react-native-linear-gradient')
compile project(':react-native-video')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+"  // From node_modules
}
Walter Monecke
  • 2,386
  • 1
  • 19
  • 52

1 Answers1

0

Check this comment on create-react-native package, it seems like some modules uses a version of native modules that's not the version you use in the native side of your app, so, from the library, it can't fetch the assets.

Add this line at the end of your android/build.gradle file, under your RN directory.

subprojects { 
     afterEvaluate { 
         project -> if (project.hasProperty("android")) { 
             android { 
                 compileSdkVersion 26 
                buildToolsVersion '26.0.2' 
             } 
         } 
     } 
 }

It just forces the version to the one you set.

It' android/build.gradle not android/app/build.gradle.

rowinbot
  • 587
  • 4
  • 13