简体   繁体   中英

Android Studio doesn't see Android

I tried to create a new project, and Android Studio does not see any of the Android sdk.

Version info:

Android Studio v0.8.2

Steps to reproduce:

  1. New Project -> Next -> Next -> Blank Activity -> Finish
  2. Go to MyActivity.java and notice that all Android classes are not recognized.

build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 19
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "com.example.myapplication"
        minSdkVersion 15
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
}

In Android Studio go to File > Project Structure > SDK Location (left tab) and select your default SDK path.

**Edit

Each project has its own SDK location property also. Try clicking on "local.properties" in project files and changing "sdk.dir" to the correct path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM