无法解析Android SDK工具的依赖项

无法解析Android SDK工具的依赖项,android,android-studio,Android,Android Studio,我无法在Android Studio(2.3版)上安装Android SDK工具 我犯了以下错误, 是否还有其他方法可以解决此错误?文件->使缓存无效/重新启动 或 Build->Clean Project可以提供帮助(如果有,请告诉我)从Windows中搜索SDK管理器,然后右键单击“以管理员身份运行”。尝试从那里安装它 也有同样的问题,这对我来说很有效 打开终端 $cd“sdk路径”/tools 美元/安卓 更新 TLDR;没有 无论出于何种原因,谷歌决定从Android STudio v

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

我犯了以下错误,


是否还有其他方法可以解决此错误?

文件->使缓存无效/重新启动

Build->Clean Project
可以提供帮助(如果有,请告诉我)

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

也有同样的问题,这对我来说很有效

  • 打开终端
  • $cd“sdk路径”/tools
  • 美元/安卓
  • 更新
  • TLDR;没有

    无论出于何种原因,谷歌决定从Android STudio v2.3开始取消对独立SDK管理器的直接访问。 如果您使用@iK2H的指令直接运行SDK管理器,您将看到SDK管理器没有检测到Android SDK工具v25.3.1。 可能是v25.3.1只能通过Android Studio设置提供,但目前这一点已被打破


    你最好的办法就是向上投票,把注意力吸引到谷歌上来解决这个问题。

    好的,我想我找到了解决办法。请尝试一下,并报告反馈意见。构建是成功的,但我仍然需要通过应用程序进行测试,以检查功能和其他可能的副作用。不希望所有人都等到这件事解决。如果这不起作用或有严重问题,我很乐意删除这个答案

    请发表评论

    解决方案

  • 我评论说

    编译'com.google.android.gms:play services:x.y.z'

  • 我还删除了

    com.google.android.gms:播放服务应用程序索引 com.google.android.gms:play services contextmanager

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

  • 这是我的工作
    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'
    

    谷歌在发现后不久在服务器端修复了这个问题。现在应该可以使用了。

    将您的SDK工具从旧的“SDK管理器”UI(您可以在
    /tools/android
    )更新到25.2.5,然后从android Studio更新到最新版本(26.1.1)


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

    不适用于我(尝试将工具从25.2.5更新到25.3.1),这不适用于我。我可以通过sdkmanager安装25.2.5,但升级到25.3.1时遇到问题(相同错误),例如@aghidini.invalization cache对我不起作用。尝试在Android Studio v2.3版上更新到25.3.1对我来说也不起作用。该死的工作室完全不稳定。今天早上将Android studio更新为2.3,并出现了相同的错误。仍然在努力解决这个问题。你能启动独立的SDK管理器吗?自从今天我升级到Android Studio 2.3以来,我面临着同样的问题。是的,没有问题启动SDK管理器@MonishKamble您尝试过从那里更新吗?如果是,您将得到什么错误?事实上,此SDK Tools 25.3.1不存在。在dl.google.com->Android Tools 25.3.1中显示404页面由于某些原因在SDK管理器中不可见。更新只在Android Studio中报告。我仍然无法在我的Android Studio上看到更新选项。我在这里也看到了这个问题。我的本地开发机器将更新到25.3.1,但Circle CI continuous integration server将更新到的最新版本是25.2.5。