失败[INSTALL_FAILED_OLDER_SDK] android

时间:2014-12-22 21:05:04

标签: android android-fragments android-2.3-gingerbread

手机正在运行2.3.5并且我将目标和min sdk设置为11

这是AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="testchamber.com.listfragmentexample"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="11"
    android:targetSdkVersion="11" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="testchamber.com.listfragmentexample.MainActivity"
        android:label="@string/app_name" 
        android:theme="@style/AppBaseTheme" >
        <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'
import org.apache.tools.ant.taskdefs.condition.Os

android {
compileSdkVersion 'Google Inc.:Google APIs:11'
buildToolsVersion "21.1.1"

defaultConfig
        {
            applicationId "testchamber.com.listfragmentexample"
            minSdkVersion 11
            targetSdkVersion 11
        }

   buildTypes
        {
            release {
                minifyEnabled true
            }
        }


   }

 dependencies {
 compile 'com.android.support:support-v4:18.0.+'
 compile 'com.android.support:appcompat-v7:18.0.+'
  }

我不明白为什么这不应该在我的htc欲望上运行2.3.5(姜饼)

1 个答案:

答案 0 :(得分:1)

API等级11是Android 3.0。您无法安装将minSdk 11声明为运行2.3.5的设备的应用程序。

要进行安装,请将minSdk降低到9或更低。

相关问题