Unable to resolve dependencies for Android SDK Tools

前端 未结 7 1665
说谎
说谎 2021-02-05 09:46

I can\'t install Android SDK Tools on Android Studio (version 2.3).

I got the following error, \"Unable

相关标签:
7条回答
  • 2021-02-05 10:22

    TLDR; no.

    Google, for whatever reason, has decided to remove direct access to the standalone SDK Manager starting with Android STudio v2.3. If you run SDK manager directly using @iK2H 's instructions, you will see that SDK manager does not detect Android SDK Tools v25.3.1. It could be that v25.3.1 is only available via Android Studio settings, but this is broken for now.

    Your best best is to upvote this issue to draw attention to Google to fix it.

    0 讨论(0)
  • 2021-02-05 10:23
    1. Open the terminal
    2. $ cd "sdk path"/tools
    3. $ ./android
    4. Update
    0 讨论(0)
  • 2021-02-05 10:30

    From Windows, search for SDK Manager and right click to 'run as administrator'. Attempt to the install it from there.

    Was having the same issue and that worked for me...

    0 讨论(0)
  • 2021-02-05 10:33

    Ok, I think I found the solution. Please try it out and report back on comments. Build is a success, but I still need to test by app to check for features and other possible side effects. Did not want everyone to wait until this is resolved. If this does not work or has serious issues, I am happy to delete this answer.

    PLEASE COMMENT

    The solution

    1. I commented out

      compile 'com.google.android.gms:play-services:x.y.z'

    2. I also removed

      com.google.android.gms:play-services-appindexing com.google.android.gms:play-services-contextmanager

    3. Upgraded the remaining com.google.android.gms:* services to 10.2.0

    This is my working build.gradle with no errors

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 25
        buildToolsVersion '25.0.2'
        defaultConfig {
            minSdkVersion 16
            targetSdkVersion 25
            multiDexEnabled = true
        }
    
        def applicationVersion = '*****'
    
        dexOptions {
    //        incremental = true;   // If anybody use below 2.2.2 android studio then please uncomment this line. It's by default true.
            preDexLibraries = false
            javaMaxHeapSize "2g"
        }
    
        signingConfigs {
            ....
        }
    
        buildTypes {
            ...
        }
    
        productFlavors {
           ...
        }
    
        packagingOptions {
            ...
        }
    }
    
    dependencies {
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:support-v4:25.1.1'
     //    compile 'com.google.code.gson:gson:2.2.4'
    
        compile 'com.fasterxml.jackson.core:jackson-core:2.6.1'
        compile 'com.fasterxml.jackson.core:jackson-annotations:2.6.1'
        compile 'com.fasterxml.jackson.core:jackson-databind:2.6.1'
        compile 'com.android.support:appcompat-v7:25.1.1'
        compile 'com.android.support:design:25.1.1'
        compile 'com.crittercism:crittercism-android-agent:+'
        compile 'com.android.support:multidex:1.0.1'
        compile 'com.google.android.gms:play-services:10.2.0'
        compile 'com.google.android.gms:play-services-base:10.2.0'
    //    compile 'com.google.android.gms:play-services-appindexing:10.2.0'
    //    compile 'com.google.android.gms:play-services-contextmanager:10.2.0'
        compile 'com.google.android.gms:play-services-places:10.2.0'
        compile 'com.google.android.gms:play-services-nearby:10.2.0'
        compile 'com.google.android.gms:play-services-maps:10.2.0'
    //    compile 'com.google.android.gms:play-services-ads:10.2.0'
    //    compile 'com.google.android.gms:play-services-auth:10.2.0'
        compile 'com.google.android.gms:play-services-gcm:10.2.0'
        compile 'com.google.android.gms:play-services-analytics:10.2.0'
        compile 'com.google.android.gms:play-services-location:10.2.0'
    //    compile 'com.google.android.gms:play-services-awareness:10.2.0'
    //    compile 'com.google.android.gms:play-services-cast:10.2.0'
    //    compile 'com.google.android.gms:play-services-plus:10.2.0'
        compile 'com.google.maps.android:android-maps-utils:0.4.+'
        compile 'com.google.zxing:core:3.2.0'
        compile 'com.journeyapps:zxing-android-embedded:3.3.0@aar'
        compile 'com.google.firebase:firebase-messaging:10.2.0'
        compile 'com.google.firebase:firebase-core:10.2.0'
        compile 'com.google.firebase:firebase-analytics:10.2.0'
        compile 'com.flurry.android:analytics:6.4.2'
        ....
    }
    apply plugin: 'com.google.gms.google-services'
    
    0 讨论(0)
  • 2021-02-05 10:41

    Update your SDK tools from old "SDK Manager" UI (You can find it at <your SDK>/tools/android) to 25.2.5 then update it from Android Studio to latest version (26.1.1).

    For some reasons you can't see newer versions in SDK Manager UI.

    0 讨论(0)
  • 2021-02-05 10:42

    Google fixed this, on the server side, shortly after discovery. It should work now.

    0 讨论(0)
提交回复
热议问题