无法解析Android SDK工具的依赖关系

时间:2022-09-03 22:34:47

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

我无法在Android Studio(版本2.3)上安装Android SDK工具。

I got the following error, 无法解析Android SDK工具的依赖关系

我收到以下错误,

Is there anyway I can solve this error?

无论如何我能解决这个错误吗?

7 个解决方案

#1


0  

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

谷歌在发现后不久就在服务器端对此进行了修复。它现在应该工作。

#2


3  

TLDR; no.

TLDR;没有。

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.

无论出于何种原因,谷歌决定从Android STudio v2.3开始删除对独立SDK Manager的直接访问。如果您使用@ iK2H的说明直接运行SDK管理器,您将看到SDK管理器未检测到Android SDK Tools v25.3.1。可能是v25.3.1只能通过Android Studio设置使用,但现在已经破了。

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

你最好的方法是提出这个问题,以引起人们对谷歌的关注。

#3


1  

  1. Open the terminal
  2. 打开终端
  3. $ cd "sdk path"/tools
  4. $ cd“sdk path”/ tools
  5. $ ./android
  6. $ ./android
  7. Update
  8. 更新

#4


0  

File -> Invalidate Caches / Restart or Build -> Clean Project can help (let me know if it did)

文件 - >使缓存无效/重新启动或构建 - >清理项目可以提供帮助(如果有,请告诉我)

#5


0  

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

在Windows中,搜索SDK Manager并右键单击“以管理员身份运行”。尝试从那里安装它。

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

有同样的问题,这对我有用...

#6


0  

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.

好的,我想我找到了解决方案。请尝试一下并报告评论。构建是成功的,但我仍然需要通过app测试来检查功能和其他可能的副作用。不希望每个人都等到这个问题得到解决。如果这不起作用或有严重问题,我很乐意删除这个答案。

PLEASE COMMENT

请给出意见

The solution

解决方案

  1. I commented out

    我评论说

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

    编译'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

    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

    将剩余的com.google.android.gms:*服务升级到10.2.0

This is my working build.gradle with no errors

这是我的工作build.gradle没有错误

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'

#7


0  

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).

从旧的“SDK Manager”UI(您可以在 / tools / android中找到)更新SDK工具到25.2.5然后将其从Android Studio更新到最新版本(26.1.1)。

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

由于某些原因,您无法在SDK Manager UI中看到更新的版本。

#1


0  

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

谷歌在发现后不久就在服务器端对此进行了修复。它现在应该工作。

#2


3  

TLDR; no.

TLDR;没有。

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.

无论出于何种原因,谷歌决定从Android STudio v2.3开始删除对独立SDK Manager的直接访问。如果您使用@ iK2H的说明直接运行SDK管理器,您将看到SDK管理器未检测到Android SDK Tools v25.3.1。可能是v25.3.1只能通过Android Studio设置使用,但现在已经破了。

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

你最好的方法是提出这个问题,以引起人们对谷歌的关注。

#3


1  

  1. Open the terminal
  2. 打开终端
  3. $ cd "sdk path"/tools
  4. $ cd“sdk path”/ tools
  5. $ ./android
  6. $ ./android
  7. Update
  8. 更新

#4


0  

File -> Invalidate Caches / Restart or Build -> Clean Project can help (let me know if it did)

文件 - >使缓存无效/重新启动或构建 - >清理项目可以提供帮助(如果有,请告诉我)

#5


0  

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

在Windows中,搜索SDK Manager并右键单击“以管理员身份运行”。尝试从那里安装它。

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

有同样的问题,这对我有用...

#6


0  

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.

好的,我想我找到了解决方案。请尝试一下并报告评论。构建是成功的,但我仍然需要通过app测试来检查功能和其他可能的副作用。不希望每个人都等到这个问题得到解决。如果这不起作用或有严重问题,我很乐意删除这个答案。

PLEASE COMMENT

请给出意见

The solution

解决方案

  1. I commented out

    我评论说

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

    编译'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

    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

    将剩余的com.google.android.gms:*服务升级到10.2.0

This is my working build.gradle with no errors

这是我的工作build.gradle没有错误

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'

#7


0  

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).

从旧的“SDK Manager”UI(您可以在 / tools / android中找到)更新SDK工具到25.2.5然后将其从Android Studio更新到最新版本(26.1.1)。

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

由于某些原因,您无法在SDK Manager UI中看到更新的版本。