【发布时间】:2014-07-01 20:04:14
【问题描述】:
我是 Android 新手,我正在使用 Android Studio。我创建了一个新项目只是为了展示 Hello World!但由于此错误,我无法让它在 AVD 上运行:Failure [INSTALL_FAILED_OLDER_SDK]。
我已经搜索过答案,我知道这与 build.gradle 和 minSdkVersion 有关,但任何答案都对我有用。
这是我的 AndroidManifest.xml :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.scoelli.test" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MyActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
这是我的 build.gradle :
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-L'
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.example.scoelli.test"
minSdkVersion 8
targetSdkVersion 'L'
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
我不仅希望得到答案,还希望得到解释。
谢谢!
【问题讨论】: