shimi_tap
shimi_tap

Reputation: 7962

Android Studio 0.5.3 android.compileSdkVersion is missing

I'm using Android studio 0.5.3

I keep getting :

Gradle 'OpenBook' project refresh failed: Cause: android.compileSdkVersion is missing! Gradle settings

// 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.+'
    }
}
apply plugin: 'android'

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.3"

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
    }

    sourceSets {
        main {
            manifest.srcFile '/MyApp/src/main/AndroidManifest.xml'
        }
    }
}

And My App Buid.gradle

apply plugin: 'android'

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.3"

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
    }

    sourceSets {
        main {
            manifest.srcFile '/src/main/AndroidManifest.xml'
        }
    }
}



dependencies {
//    compile 'com.android.support:appcompat-v7:+'
    compile project("libraries:library-toast")
    compile project("libraries:Volley")
    compile project("libraries:actionbarsherlock")
    compile project("libraries:Dialoglibrary")
    compile project("libraries:google-play-services_lib")
    compile project("libraries:PullToRefreshlibrary")
    compile project("libraries:facebook")
    compile project("libraries:SlidingTabBarlibrary")
    compile project("libraries:AndroidPlot-Core")
    compile project("libraries:SignUpModule")
    compile project("libraries:Jars")
    compile project("libraries:UpdateChecker")
    compile "com.mixpanel.android:mixpanel-android:4.0.0@aar"
}

Not Sure what to do. Thanks for any help

Upvotes: 3

Views: 3922

Answers (1)

AndroidGuy
AndroidGuy

Reputation: 3451

You have specified "compileSdkVersion 19" in your build file. Seems like you are missing that SDK (can you post more of the output with the error in it) You need to make sure that you have installed the right SDK using the SDK manager in Android Studio.

Jake Wharton has created a new gradle plugin to automatically keep the SDKs updated https://github.com/JakeWharton/sdk-manager-plugin

Upvotes: 1

Related Questions