gpt4 book ai didi

android - react native android 构建问题

转载 作者:太空狗 更新时间:2023-10-29 13:08:32 25 4
gpt4 key购买 nike

尝试构建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'.

正如您在错误中看到的,react-native-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

最佳答案

我有同样的问题,这显然是由于最近更新了 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 中看到的那样

关于android - react native android 构建问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44198669/

25 4 0