Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio update 0.5.3 - platform 'android-19' not found

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:

Project's 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()     } } 

App's 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']) } 

In SDK Manager I have all the builds installed including 19.+.

The error I get when syncing:

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

to

compileSdkVersion 18

in the app's build.gradle it works... but I don't think that's the solution.

Thanks!

like image 588
Supercelo Avatar asked Mar 31 '14 12:03

Supercelo


People also ask

How do I fix Android SDK not found?

Quick fix: Uninstall Android SDK (default location C:\Users\.. \AppData\Local\Android\Sdk ) and install it again. This time affirms the minimum required storage space at your place of download. After execution check, if tools folder is now added in SDK directory.

Where is update option in Android Studio?

Open the Preferences window by clicking File > Settings (on Mac, Android Studio > Preferences). In the left panel, click Appearance & Behavior > System Settings > Updates. Be sure that Automatically check for updates is checked, then select a channel from the drop-down list (see figure 1). Click Apply or OK.

How do I change my Android platform?

In package explorer, you can right click the project name, go to properties, in the left column, click on "Android" and change the "Project Build Target" to the platform you are looking for.


2 Answers

I had the same problem.

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

like image 109
cholm Avatar answered Sep 23 '22 00:09

cholm


Deleting the following fixed my problem -

~/Library/Caches/AndroidStudioPreview

~/Library/Logs/AndroidStudioPreview

~/Library/Preferences/AndroidStudioPreview

like image 26
A23 Avatar answered Sep 21 '22 00:09

A23