gpt4 book ai didi

android - react-native-fbsdk 无法编译 'com.android.support:appcompat-v7:25.0.0'

转载 作者:行者123 更新时间:2023-11-29 02:34:34 24 4
gpt4 key购买 nike

react-native 版本 0.51.0

react-native-fbsdk 版本 0.6.3 我试过版本 0.6.0

项目在安装 react-native-fbsdk 之前运行我在 https://developers.facebook.com/docs/react-native/configure-android-current 中执行每个步骤

这是react-native-fbsdk/build.gradle

apply plugin: 'com.android.library'

android {
compileSdkVersion 25
buildToolsVersion "25.0.3"

defaultConfig {
minSdkVersion 16
targetSdkVersion 25
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile 'com.android.support:appcompat:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'com.facebook.react:react-native:+' // support react-native-v0.22-rc+
compile('com.facebook.android:facebook-android-sdk:4.+')
}

这是 app/build.gradle

dependencies {
compile project(':react-native-fbsdk')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
}

错误是...

Error:Error:Failed to resolve: com.android.support:appcompat-v7:27.0.1
Error:Error:Failed to resolve: com.android.support:appcompat:25.0.0
Error:Error:Failed to resolve: com.android.support:customtabs:27.0.1
Error:Error:Failed to resolve: com.android.support:cardview-v7:27.0.1
Error:Error:Failed to resolve: com.android.support:support-v4:27.0.1
Error:Error:Failed to resolve: com.android.support:support-core-utils:27.0.1
Error:Error:Failed to resolve: com.android.support:support-annotations:27.0.1
Error:Error:Failed to resolve: com.android.support:appcompat-v7:27.0.1
Error:Error:line (19)Failed to resolve: com.android.support:appcompat:25.0.0
Error:Error:Failed to resolve: com.android.support:customtabs:27.0.1
Error:Error:Failed to resolve: com.android.support:cardview-v7:27.0.1
Error:Error:Failed to resolve: com.android.support:support-v4:27.0.1
Error:Error:Failed to resolve: com.android.support:support-core-utils:27.0.1

最佳答案

我正在执行此解决方法,但我没有找到正确的修复方法。

node_modules/react-native-fbsdk/android/build.gradle 进行此更改:

//Before
dependencies {
...
compile('com.facebook.android:facebook-android-sdk:4+')
}

//After
dependencies {
...
compile('com.facebook.android:facebook-android-sdk:4.28.0')
}

也许对你也有帮助。

关于android - react-native-fbsdk 无法编译 'com.android.support:appcompat-v7:25.0.0',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47815237/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com