我无法在Android Studio(版本2.3)上安装Android SDK工具。
我收到以下错误信息:
是否有任何方法可以解决这个错误?
我无法在Android Studio(版本2.3)上安装Android SDK工具。
我收到以下错误信息:
是否有任何方法可以解决这个错误?
从Windows开始,搜索SDK Manager并右键单击以“以管理员身份运行”。尝试从那里安装它。
我遇到了同样的问题,这对我有用...
Google已经在发现后很快修复了这个问题,现在应该可以正常工作了。
文件 -> 无效缓存 / 重启
或者
构建 -> 清理项目
可以帮助解决问题(如果有用请告诉我)
从旧的“SDK Manager” UI(您可以在<your SDK>/tools/android
中找到它)更新您的SDK工具到25.2.5,然后从Android Studio更新到最新版本(26.1.1)。
由于某些原因,您可能无法在SDK Manager UI中看到更新的版本。
好的,我想我已经找到了解决方案。请尝试并在评论中汇报。构建成功了,但我仍然需要测试我的应用程序以检查功能和其他可能的副作用。我不希望每个人都等到这个问题解决才能继续。如果这个方法不起作用或存在严重问题,我很乐意删除此答案。
请评论
解决方案
我注释掉了
compile 'com.google.android.gms:play-services:x.y.z'
我还去掉了
com.google.android.gms:play-services-appindexing 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'