Unable to resolve dependency Android Studio 3.0

前端 未结 10 469
一整个雨季
一整个雨季 2020-12-04 21:38

It\'s good to have a Updated Android Studio 3.0. But I am facing a problem with Android Studio 3.0, I just created a new project in

相关标签:
10条回答
  • 2020-12-04 22:33

    I am facing similar error day before yesterday. Just solved it here

    Moreover, as mentioned in the latest gradle release notes , you should avoid using dynamic dependencies with version number as:

    com.facebook.android:account-kit-sdk:4.+
    

    Try to replace it with appropriate version number as 4.0.0 or latest. Hope it solves the problem.

    0 讨论(0)
  • 2020-12-04 22:35

    all the Facebook Account Kit SDK build artifacts can be found on Maven Central:

    // https://mvnrepository.com/artifact/com.facebook.android/account-kit-sdk
    api 'com.facebook.android:account-kit-sdk:4.35.0'
    

    and the according repository to add is:

    repositories {
        mavenCentral()
    }
    

    Gradle not being in offline mode, is being assumed.

    0 讨论(0)
  • 2020-12-04 22:40

    Add matchingFallbacks = ['release', 'debug'] in the buildType that is failing to compile.

    E.g. I was having an error for releaseStaging:

    buildTypes {
        debug {
            buildConfigField "String", "CODEPUSH_KEY", '""'
        }
        releaseStaging {
            buildConfigField "String", "CODEPUSH_KEY", 'myKey'
            signingConfig signingConfigs.release
            matchingFallbacks = ['release', 'debug']
        }
        release {
            buildConfigField "String", "CODEPUSH_KEY", 'myKey'
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
            signingConfig signingConfigs.release
        }
    }
    
    0 讨论(0)
  • 2020-12-04 22:44

    I had the same issue and I did fix it like this :

    implementation project(path: 'com.facebook.android:account-kit-sdk:4.+', configuration: 'default')
    
    0 讨论(0)
提交回复
热议问题