Grissom
Grissom

Reputation: 1082

react-native android build issue

Getting following error when try to build android

/Users/zoran/Documents/Oroundo/CPApp/node_modules/react-native-
fbsdk/android/build/intermediates/res/merged/release/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/zoran/Documents/Oroundo/CPApp/node_modules/react-native-
fbsdk/android/build/intermediates/res/merged/release/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/zoran/Documents/Oroundo/CPApp/node_modules/react-native-
fbsdk/android/build/intermediates/res/merged/release/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/zoran/Documents/Oroundo/CPApp/node_modules/react-native-
fbsdk/android/build/intermediates/res/merged/release/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'.

As you can see in error there is some issue with react-native-fbsdk package. Also could be helpful, here is my build.gradle file parts:

compileSdkVersion 25
buildToolsVersion "25.0.3"

defaultConfig {
    applicationId "com.cpapp"
    minSdkVersion 18
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
    ndk {
        abiFilters "armeabi-v7a", "x86"
    }
}
dexOptions {
    javaMaxHeapSize "4g"
}


dependencies {
    compile project(':react-native-device-info')
    compile project(':react-native-camera')
    compile project(':react-native-billing')
    compile project(':react-native-android-location-services-dialog-box')
    compile project(':react-native-permissions')
    compile project(':react-native-fbsdk')
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile "com.android.support:appcompat-v7:25.1.0"
    compile 'com.android.support:design:25.1.0'
    compile "com.facebook.react:react-native:0.42.3"  // From node_modules
    compile 'com.facebook.android:facebook-android-sdk:4.22.1'
    compile project(':react-native-linear-gradient')
    compile project(':react-native-i18n')
    compile project(':react-native-heading')
    compile project(':reactnativemapboxgl')
}

Previous compileSdkVersion was 23

Upvotes: 3

Views: 662

Answers (1)

Ryan Pergent
Ryan Pergent

Reputation: 5366

I had the same issue, it's apparently due to a very recent update of facebook-android-sdk.

https://github.com/facebook/react-native-fbsdk/pull/339

A fix should be submitted soon. Meanwhile you can solve it by opening

your_project\node_modules\react-native-fbsdk\android\build.gradle

and changing:

compile('com.facebook.android:facebook-android-sdk:4.+')

for

compile('com.facebook.android:facebook-android-sdk:4.22.1')

as you can see in the change waiting for submission

Upvotes: 2

Related Questions