Android Studio 更新 0.5.3 - 找不到平台“android-19" [英] Android Studio update 0.5.3 - platform 'android-19' not found
问题描述
昨天我打开 Android Studio,它要求我更新.我现在已经完全安装了 v0.5.3、SDK 19 和 gradle 0.9.+.我认为这些信息是正确的,但我并不完全了解 gradle 策略是如何工作的.
Yesterday I opened Android Studio and it asked me to be updated. I now have v0.5.3, SDK 19 fully installed and gradle 0.9.+. I think this information is correct but I'm not fully aware how the gradle strategy works.
问题是我的 gradle 应用程序停止同步,甚至当我创建一个全新的项目时它也不会同步.详情如下:
The problem is that my gradle apps stopped syncing and even when I create a brand new project it does not sync. Here are the details:
项目的 build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
}
allprojects {
repositories {
mavenCentral()
}
}
应用的 build.gradle:
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "19.0.3"
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:19.+'
compile fileTree(dir: 'libs', include: ['*.jar'])
}
在 SDK Manager 中,我安装了所有版本,包括 19.+.
In SDK Manager I have all the builds installed including 19.+.
同步时出现的错误:
Failed to set up SDK
Error:Module 'app': platform 'android-19' not found.
Information:Double-click here to open Android SDK Manager and install all missing platforms.
我知道如果我改变了
compileSdkVersion 19
compileSdkVersion 19
到
compileSdkVersion 18
compileSdkVersion 18
在应用程序的 build.gradle 中它可以工作...但我认为这不是解决方案.
in the app's build.gradle it works... but I don't think that's the solution.
谢谢!
推荐答案
我遇到了同样的问题.
删除 ~/.AndroidStudioPreview
(在 Debian GNU/Linux 'sid' 上)修复了这个问题.该目录来自旧版本的 AS (0.3.x).我不知道 GNU/Linux ~/.AndroidStudioPreview
在 Windows/Mac OS X/... 上的等价物是什么(对于 Windows,它位于 C:\Users\<用户>\.AndroidStudioPreview\
).
Deleting ~/.AndroidStudioPreview
(on Debian GNU/Linux 'sid') fixed the problem. This directory was from an older version of AS (0.3.x). I don't know what the equivalent of the GNU/Linux ~/.AndroidStudioPreview
is on Windows/Mac OS X/... (for Windows it's under C:\Users\<user>\.AndroidStudioPreview\
).
这篇关于Android Studio 更新 0.5.3 - 找不到平台“android-19"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!