2

獲得以下錯誤,當嘗試構建Android反應,原生的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'. 

正如你可以看到錯誤有一些問題與反應,本機fbsdk包。也可能是有幫助的,這是我的build.gradle文件部分:

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') 
} 

上一頁compileSdkVersion是23

回答

2

我有同樣的問題,這顯然是由於一個非常Facebook最近,Android的SDK的更新。

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

修復程序應該儘快提交。同時您可以通過打開

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

和不斷變化的解決這個問題:

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

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

,你可以在the change waiting for submission

+0

酷看,我也有找拉請求這個問題https://github.com/facebook/react-native-fbsdk/pull/339 – Grissom