`
seya
  • 浏览: 355802 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

INSTALL_FAILED_OLDER_SDK ERROR

 
阅读更多
Install APK with adb:
$ platform-tools/adb install out/target/product/generic/system/app/Bundled.apk
233 KB/s (12588 bytes in 0.052s)
pkg: /data/local/tmp/Bundled.apk
Failure [INSTALL_FAILED_OLDER_SDK]
Error message in logcat:
D/PackageParser(   60): Scanning package: /data/app/vmdl64930.tmp
W/PackageParser(   60): /data/app/vmdl64930.tmp (at Binary XML file line #0): Requires development platform AOSP but this is a release platform.
The error was created by android.content.pm.PackageParser, which compares the android:minSdkVersion and android:targetSdkVersion attributes of the uses-sdk element of AndroidManifest.xml 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 AndroidManifest.xml:
<uses-sdk android:minSdkVersion="AOSP"
        android:targetSdkVersion="AOSP">
</uses-sdk>



And the relevant section in android.content.pm.PackageParser:
if (minCode != null) {
    if (!minCode.equals(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 (!targetCode.equals(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.
    pkg.applicationInfo.targetSdkVersion
    = android.os.Build.VERSION_CODES.CUR_DEVELOPMENT;
} else {
    pkg.applicationInfo.targetSdkVersion = targetVers;
}
分享到:
评论

相关推荐

    安卓studio的INSTALL_FAILED_OLDER_SDK的解决方法

    The application could not be installed: INSTALL_FAILED_OLDER_SDK The application’s minSdkVersion is newer than the device API level. 意思是我使用的设备的sdk版本低于要求的sdk版本 解决方法: 找到项目...

    install_guide_ja_JP_older2x7_java编程_

    hasilesiesiesiesielugbv63qo4i

    无线网络测试APP操作步骤

    为了使各位装维兄弟对无线网络部提供的测试APP有 更好的理解,特将各APP测试的详细步骤列出,以供参考: 注意事项:由于无线网络环境随时都在变化,填写各个数值时需在测试软件显示相对问题的情况下填写。...

    ApkIDE3.3.0.0作者原版,解决常见apk打包安装问题.rar

    adb: failed to install SystemActivities.apk: Failure [INSTALL_FAILED_OLDER_SDK: Failed parse during installPackageLI: /data/app/vmdl1716187195.tmp/base.apk (at Binary XML file line #0): Requires newer...

    adb1.0.26包含fastboot.exe

    INSTALL_FAILED_OLDER_SDK 设备系统版本低于应用要求 INSTALL_FAILED_CONFLICTING_PROVIDER 设备里已经存在与应用里同名的 content provider INSTALL_FAILED_NEWER_SDK 设备系统版本高于应用要求 INSTALL_FAILED_...

    android_sdk_linux_m3-rc20a.zip

    android_sdk_linux_m3-rc20a.zip -&gt; Linux (i386) -&gt; md5sum : 2660b4029039b7d714e59827e9a9a11d -&gt; https://developer.android.com/sdk/older_releases

    opengl_nehe_SDK

    Note: Some older cards, such as Voodoos and the early ATIs do not have drivers which appear to be completely compatible. Use these at your own risk. Any card problems reported are in bugs.txt ...

    wps_linux_older_2016.7z

    wps在2019版本添加了pdf,但是这个Pdf阅读器特别不好用,而且通过文献阅读器,是强制默认使用wps的,所以推荐使用旧版本;wps_linux_older_2016

    android-sdk- windows-1 .0_r1.zip

    https://developer.android.com/sdk/older_releases android-sdk- windows-1 .0_r1.zip md5sum : d69f4ee93d4010f726c04302662fd999

    dft.zip_K._older9gv_tales8fy_傅里叶变换

    ?成?个序列 x[n],并?三种不同的程序计算其离散傅?叶变换 X[k],并? 较其计算结果与运?时间。

    佳能单反相机开发包(Canon digital camera SDK)3.9.0版本Canon EOS ED-SDK3.9.0

    佳能单反相机开发包(Canon digital camera SDK)3.9.0版本Canon EOS ED-SDK3.9.0。 09/25/2018 -Added support for the EOS R -Deleted the description of the older model out of support and deleted the ...

    Android代码-dropbox-sdk-java

    A Java library to access Dropbox's HTTP-based Core API v2. This SDK also supports the older Core API v1, but that support will be removed at some point. License: MIT Documentation: Javadocs Setup If ...

    RealThinClientSDK_v610_BETA

    2.) Install RTC SDK components in Delphi 3.) Make the RTC SDK accessible from XCode (for iOS development) 4.) Update RTC SDK components in Delphi 5.) Help 6.) Demos 7.) Support *****************...

    mysql 5.5 安装配置简单教程

    下面的是MySQL安装的过程,用的可执行文件安装的,详细说明了一下! 1.打开下载的mysql安装文件mysql-5.0.27-win32.zip,双击解压缩,运行“setup.exe“ 2.mysql安装向导启动,按“Next”继续 选择安装类型,有...

    Myeclipse的egit插件

    org.eclipse.egit.repository-2.3.1.201302201838-r ,org.eclipse.egit.repository-4.0.1.201506240215-r, ...git插件官网地址:http://wiki.eclipse.org/EGit/FAQ#Where_can_I_find_older_releases_of_EGit.3F

    DriverStudio 3.2 For VisualStudio 2005 补丁

    Select "yes" if prompted to copy over an existing one. &lt;br&gt;· Then unregister the older version. Go to start-&gt;run and type "regsvr32 -u "&lt;INSTALL_DIR&gt;\DriverStudio\Common\Bin\dsddkenv8.dll" &lt;br...

    VST SDK 3.612

    VST SDK 3.6.12 •The VST 3 API •VST 3 Implementation Helper Classes •AAX, AU and VST 2 wrappers •VST 3 Plug-ins Examples About VST 3 VST 3 is a general rework of the long-serving VST Plug-in ...

    clean-up-gh-packages:GitHub动作,清理发布到GitHub Packages的Maven软件包的旧版本

    必需的OLDER_THAN_NUMBER_OF_DAYS 早于OLDER_THAN_NUMBER_OF_DAYS的软件包将被删除。 必需的TOKEN 具有删除权限的身份验证令牌。 必需的用法示例- name : Clean up packages uses : gps/clean-up-gh-packages@...

    IBM Unrestricted SDK JCE policy files

    IBM Unrestricted SDK JCE policy files, Files for older versions of the SDK Version Multiple Languages: English International

    Older_demo1.zip_c# 养老院_养老院_无边框_登录界面设计

    一个简单的养老院管理系统,无边框可鼠标点击移动的项目,界面完善,目前只完成一小部分业务。

Global site tag (gtag.js) - Google Analytics