I am new to Android Studio and made an app but its not running on my physical device HTC one M8 giving and error like Failure [INSTALL_FAILED_OLDER_SDK]
我是Android Studio的新用户并制作了一个应用程序,但它没有在我的物理设备上运行HTC one M8给出和失败如失败[INSTALL_FAILED_OLDER_SDK]
htc one m8 android version: 5.0.2
htc一个m8安卓版:5.0.2
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.example.darab.crazy_tip_calc"
minSdkVersion 22
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
3 个解决方案
#1
2
Just set minSdkVersion 15
instead of 22
只需设置minSdkVersion 15而不是22
android:minSdkVersion
安卓的minSdkVersion
An integer designating the minimum API Level required for the application to run. The Android system will prevent the user from installing the application if the system's API Level is lower than the value specified in this attribute.
一个整数,指定应用程序运行所需的最低API级别。如果系统的API级别低于此属性中指定的值,则Android系统将阻止用户安装应用程序。
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.example.darab.crazy_tip_calc"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
#2
3
Your device OS version is lower than you're app SDK version.
您的设备操作系统版本低于您的应用SDK版本。
minSdkVersion 22
targetSdkVersion 22
Check your device version. I would suggest to set minSdkVersion to 15 or the the API level of your device. And this is 21 (5.0.2 of your M8).
检查您的设备版本。我建议将minSdkVersion设置为15或设备的API级别。这是21(你的M8的5.0.2)。
#3
0
Check your minSdk version and Target Sdk Version.
检查你的minSdk版本和Target Sdk版本。
#1
2
Just set minSdkVersion 15
instead of 22
只需设置minSdkVersion 15而不是22
android:minSdkVersion
安卓的minSdkVersion
An integer designating the minimum API Level required for the application to run. The Android system will prevent the user from installing the application if the system's API Level is lower than the value specified in this attribute.
一个整数,指定应用程序运行所需的最低API级别。如果系统的API级别低于此属性中指定的值,则Android系统将阻止用户安装应用程序。
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.example.darab.crazy_tip_calc"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
#2
3
Your device OS version is lower than you're app SDK version.
您的设备操作系统版本低于您的应用SDK版本。
minSdkVersion 22
targetSdkVersion 22
Check your device version. I would suggest to set minSdkVersion to 15 or the the API level of your device. And this is 21 (5.0.2 of your M8).
检查您的设备版本。我建议将minSdkVersion设置为15或设备的API级别。这是21(你的M8的5.0.2)。
#3
0
Check your minSdk version and Target Sdk Version.
检查你的minSdk版本和Target Sdk版本。