失败[INSTALL_FAILED_OLDER_SDK] - Android Studio。

时间:2021-04-10 17:03:09

I am a beginner to Android Development. I created a Hello World Application in Android Studio. I tried using my phone through ADB to debug my app since I have heard the Android emulators are painfully slow. However, I had received an error when it was trying to install into my phone:

我是Android开发的初学者。我在Android Studio中创建了Hello World应用程序。我尝试用我的手机通过ADB来调试我的应用程序,因为我听说Android模拟器非常慢。然而,当它试图安装到我的手机时,我收到了一个错误:

Failure [INSTALL_FAILED_OLDER_SDK]

失败(INSTALL_FAILED_OLDER_SDK)

My phone is the Samsung Galaxy S4 (M919) with my min API level set at 15, so I thought that can't be right since I am running Kit Kat. Could Cyanogenmod be a problem as that is what I am running?

我的手机是三星Galaxy S4 (M919),我的最小API水平设置在15,所以我认为这是不可能的,因为我正在运行Kit Kat。Cyanogenmod是否会成为一个问题,因为这就是我正在运行的?

I searched and found that many others have had this problem, but I still have not found a solution (maybe due to my incompetence and just didn't understand it, but at least I don't think it is).

我搜索了一下,发现很多人都有这个问题,但我还是没有找到解决办法(也许是由于我的无能,只是我不理解,但至少我不这么认为)。

Thanks in advance

谢谢提前

EDIT - manifest:

编辑-清单:

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

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            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>

1 个解决方案

#1


0  

check your build.gradle file and see that you are using the correct sdk version. I had the same problem because the targetSdkVersion wasn't correct.

检查您的构建。gradle文件,并看到您正在使用正确的sdk版本。我有同样的问题,因为targetSdkVersion不正确。

Bad: defaultConfig { applicationId "com.software.myapplication" minSdkVersion 19 targetSdkVersion 'L' versionCode 1 versionName "1.0" }

Bad: defaultConfig {applicationId "com.software。myapplication" minSdkVersion 19 targetSdkVersion 'L' versionCode 1 versionName "1.0"}

Correct: defaultConfig { applicationId "com.software.myapplication" minSdkVersion 19 targetSdkVersion 19 versionCode 1 versionName "1.0" }

正确:defaultConfig {applicationId "com.software。myapplication" minSdkVersion 19 targetSdkVersion 19 versionCode 1 versionName "1.0"

#1


0  

check your build.gradle file and see that you are using the correct sdk version. I had the same problem because the targetSdkVersion wasn't correct.

检查您的构建。gradle文件,并看到您正在使用正确的sdk版本。我有同样的问题,因为targetSdkVersion不正确。

Bad: defaultConfig { applicationId "com.software.myapplication" minSdkVersion 19 targetSdkVersion 'L' versionCode 1 versionName "1.0" }

Bad: defaultConfig {applicationId "com.software。myapplication" minSdkVersion 19 targetSdkVersion 'L' versionCode 1 versionName "1.0"}

Correct: defaultConfig { applicationId "com.software.myapplication" minSdkVersion 19 targetSdkVersion 19 versionCode 1 versionName "1.0" }

正确:defaultConfig {applicationId "com.software。myapplication" minSdkVersion 19 targetSdkVersion 19 versionCode 1 versionName "1.0"