今天早些时候安装了Android L开发者预览版SDK后,我想使我的应用程序兼容Android L和旧版本,如Jelly Bean。我的应用程序使用minSdkVersion 16,但由于我尝试了开发者预览版,Android Studio似乎不尊重我的minSdkVersion。我正在尝试在我的Galaxy Nexus(API 19)上运行应用程序,这里是我得到的错误:
这是我的AndroidManifest.xml文件:
![enter image description here](https://istack.dev59.com/iKywd.webp)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.simon.holocountownapp"
android:versionCode="45"
android:versionName="4.1.1" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="L" />
...
Here's my build.gradle:
apply plugin: 'android'
android {
compileSdkVersion 'android-L'
buildToolsVersion '20'
defaultConfig {
minSdkVersion 16
targetSdkVersion 'L'
}
buildTypes {
release {
runProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
productFlavors {
}
}
dependencies {
compile 'com.doomonafireball.betterpickers:library:1.5.2'
compile 'uk.co.androidalliance:edgeeffectoverride:1.0.1'
compile 'com.readystatesoftware.systembartint:systembartint:+'
compile "com.android.support:support-v4:+"
compile "com.android.support:support-v13:+"
}