当前位置: 代码迷 >> Android >> Android Studio 批改api level
  详细解决方案

Android Studio 批改api level

热度:209   发布时间:2016-04-28 03:08:54.0
Android Studio 修改api level

?

?

  1. Update build.gradle

Example of build.gradle: app/src/build.gradle

apply plugin:'com.android.application'android {    compileSdkVersion 20    buildToolsVersion "20.0.0"    defaultConfig {        applicationId "com.courses.sottocorp.sunshine"        minSdkVersion 10        targetSdkVersion 20        versionCode 1        versionName "1.0"}    buildTypes {        release {            runProguard false            proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'}}}dependencies {    compile fileTree(dir:'libs', include:['*.jar'])    compile 'com.android.support:appcompat-v7:20.0.0'    compile 'com.android.support:support-v4:20.0.0'}
  1. Sync gradle button
  2. Rebuild project

After?updating the build.gradle minSdkVersion, you have to click on the button to sync gradle file ("Sync Project with Gradle files").

That will clear the market.

Updating manifest.xml, e.g. deleting any references to SDK levels in the manifest file, is NOT necessary anymore in Android Studio.

  相关解决方案