Install APK with adb:
$ platform-tools/adb install out/target/product/generic/system/app/
233 KB/s (12588 bytes in 0.052s)
pkg: /data/local/tmp/
Failure [INSTALL_FAILED_OLDER_SDK]
Error message in logcat:
D/PackageParser( 60): Scanning package: /data/app/
W/PackageParser( 60): /data/app/ (at Binary XML file line #0): Requires development platform AOSP but this is a release platform.
The error was created by , which compares the android:minSdkVersion and android:targetSdkVersion attributes of the uses-sdk element of in the APK file against the SDK version of the device or emulator. The SDK version on the device has to be greater than that required by android:minSdkVersion.
In my case, since I built the package with AOSP, the target emulator has to be AOSP also. This is the relavant section in :
<uses-sdk android:minSdkVersion="AOSP"
android:targetSdkVersion="AOSP">
</uses-sdk>
And the relevant section in :
if (minCode != null) {
if (!(SDK_CODENAME)) {
if (SDK_CODENAME != null) {
outError[0] = "Requires development platform " + minCode
+ " (current platform is " + SDK_CODENAME + ")";
} else {
outError[0] = "Requires development platform " + minCode
+ " but this is a release platform.";
}
mParseError = PackageManager.INSTALL_FAILED_OLDER_SDK;
return null;
}
} else if (minVers > SDK_VERSION) {
outError[0] = "Requires newer sdk version #" + minVers
+ " (current version is #" + SDK_VERSION + ")";
mParseError = PackageManager.INSTALL_FAILED_OLDER_SDK;
return null;
}
if (targetCode != null) {
if (!(SDK_CODENAME)) {
if (SDK_CODENAME != null) {
outError[0] = "Requires development platform " + targetCode
+ " (current platform is " + SDK_CODENAME + ")";
} else {
outError[0] = "Requires development platform " + targetCode
+ " but this is a release platform.";
}
mParseError = PackageManager.INSTALL_FAILED_OLDER_SDK;
return null;
}
// If the code matches, it definitely targets this SDK.
= .VERSION_CODES.CUR_DEVELOPMENT;
} else {
= targetVers;
}
相关文章
- 安装提示错误 [INSTALL_FAILED_OLDER_SDK]的解决方案
- configure: error: Cannot find php-config. Please use --with-php-config=PATH 错误的解决方案
- 安装提示“INSTALLER”已损坏,无法打开,你应该推出磁盘映像的解决方法
- Latex package安装方法(错误提示:!LaTeX Error: File ‘‘ not found解决方法)
- Android 12去除安装应用时的“未知应用来源”提示
- 蓝易云 - bash提示“telnet command not found“错误解决方案
- Eclipse——e(fx)clipse下载错误导致的安装失败解决方案
- Eclipse中Javafx安装与出现错误: 缺少 JavaFX 运行时组件, 需要使用该组件来运行此应用程序的解决方法
- 安装Office2007时出现1706错误的解决方案
- M1芯片的MacBookPro安装rosetta时提示安装失败