0

I'm trying to compile a react native android project after installing fbsdk and encountered this error:

/Users/ethanwang/Github/reactnative/Glever_RNI/Glever/android/app/build/intermediates/res/merged/debug/values-v24/values-v24.xml
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.
/Users/ethanwang/Github/reactnative/Glever_RNI/Glever/android/app/build/intermediates/res/merged/debug/values-v26/values-v26.xml
Error:(15, 21) No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
Error:(15, 21) No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

I have made sure that the version of appcompact matches with sdk version in gradle

I have also followed this post Facebook Sdk Android Error Building to force using "com.facebook.android:facebook-android-sdk:4.22.1" :

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.resure.glever"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
...
dependencies {
    compile "com.android.support:appcompat-v7:23.0.1"
    compile(project(':react-native-fbsdk')){
        exclude(group: 'com.facebook.android', module: 'facebook-android-sdk')
    }
    compile "com.facebook.android:facebook-android-sdk:4.22.1"

What else could have caused this problem?

bleepmeh
  • 967
  • 5
  • 17
  • 36

1 Answers1

2

I fixed it by upgrading to sdk 26

 compileSdkVersion 26
 buildToolsVersion "26.0.1"

and appcompat:

dependencies {
    compile "com.android.support:appcompat-v7:26.0.1"
bleepmeh
  • 967
  • 5
  • 17
  • 36
  • Thanks, this worked but I've got a `DexException: Cannot merge new index 65536 into a non-jumbo instruction` which was fixed with the answers from here https://stackoverflow.com/questions/17320088/android-build-dex-jumbo-mode-in-gradle – Boggio Apr 30 '18 at 13:13