Android的Studio更新0.5.3 - 平台“Android为19'未找到未找到、平台、Studio、Android

2023-09-05 07:04:12 作者:人生得意须尽欢

昨天我打开Android的工作室,并要求我进行更新。我现在有v0.5.3,SDK 19完全安装和摇篮0.9 +。我觉得这个信息是正确的,但我不完全知道如何摇篮战略工程。

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.

现在的问题是,我的摇篮应用程序停止同步,甚至当我创建一个全新的项目不同步。 下面是详细信息:

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管理器我都该版本安装,包括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.

我知道,如果我改变

I know that if I change

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.

谢谢!

推荐答案

我有同样的问题。

删除〜/ .AndroidStudio preVIEW (在Debian GNU / Linux的SID)解决了这一问题。该目录是从AS(0.3.x)的旧版本。我不知道在GNU / Linux下的等价〜/ .AndroidStudio preVIEW 是在Windows / Mac OS X的是什么/ ...(适用于Windows它的下 C:\用户\<使用者> \ AndroidStudio preVIEW \

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