什么是“失败 [INSTALL_FAILED_OLDER_SDK]"?在 Android Studio 中是什么意思?

问题描述:

我得到了用于制作应用程序的 Froyo (2.2) 设备.当我尝试直接在设备上运行应用程序时,它显示一条错误消息

I got this Froyo (2.2) device that I am using to make an app. When I try to run the app directly to the device it shows an error saying

pkg: /data/local/tmp/com.example.HelloWorldProject
Failure [INSTALL_FAILED_OLDER_SDK]

在另一个窗口中出现错误提示

and in another window there's an error saying

Unable to attach test reporter to test framework or test framework quit unexpectedly

似乎是什么导致了上述错误?

What seem to make the said errors?

AndroidManifest.xml

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

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

    <application
            android:allowBackup="true"
            android:debuggable="true"
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name"
            >
        <activity
                android:name="com.example.HelloWorldProject.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>

我改变之后

defaultConfig {
    applicationId "com.example.bocheng.myapplication"
    minSdkVersion 15
    targetSdkVersion 'L' #change this to 19
    versionCode 1
    versionName "1.0"
}

build.gradle 文件中.

有效