Could not find com.android.support:appcompat-v7:25.3.1

前端 未结 8 1943
名媛妹妹
名媛妹妹 2020-12-29 06:16

I suddenly started getting this error when trying to build. This was all working a few weeks ago with no changes that I know of. The issue seems to be related to react

8条回答
  •  被撕碎了的回忆
    2020-12-29 06:55

    My case was that this is react-native-fbsdk build.gradle (https://github.com/facebook/react-native-fbsdk/blob/master/android/build.gradle):

    apply plugin: 'com.android.library'
    
    android {
        compileSdkVersion 23
        buildToolsVersion "23.0.1"
    
        defaultConfig {
            minSdkVersion 16
            targetSdkVersion 23
            versionCode 1
            versionName "1.0"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:23.1.0'
        compile 'com.facebook.react:react-native:+' // support react-native-v0.22-rc+
        compile('com.facebook.android:facebook-android-sdk:4.+')
    }
    

    I am using React Native 0.37, so this is the line that broke for me:

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

    Had to change to this for compatibility:

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

提交回复
热议问题