Android 安卓安卓失败常见问题

  /**

     * if the package is already installed.

     * 程序已经存在

     */

    public static final int INSTALL_FAILED_ALREADY_EXISTS = -1;

    /**

     * if the package archive file is invalid.

     * 无效的APK

     */

    public static final int INSTALL_FAILED_INVALID_APK = -2;

    /**

     * if the URI passed in is invalid.

     * 无效的链接

     */

    public static final int INSTALL_FAILED_INVALID_URI = -3;

    /**

     * if the package manager service found that the device

     *   didn't have enough storage space to install the app.

     * 没有足够的存储空间

     */

    public static final int INSTALL_FAILED_INSUFFICIENT_STORAGE = -4;

    /**

     * if a package is already installed with the same name.

     * 已存在同名程序

     */

    public static final int INSTALL_FAILED_DUPLICATE_PACKAGE = -5;

    /**

     * if the requested shared user does not exist.

     * 共享用户不存在

     */

    public static final int INSTALL_FAILED_NO_SHARED_USER = -6;

    /**

     * if a previously installed package of the same name has a different signature

     *   than the new package (and the old package's data was not removed).

     * 更新不兼容

     */

    public static final int INSTALL_FAILED_UPDATE_INCOMPATIBLE = -7;

    /**

     * if the new package is requested a shared user which is already installed

     *   on the device and does not have matching signature.

     * 共享用户不兼容

     */

    public static final int INSTALL_FAILED_SHARED_USER_INCOMPATIBLE = -8;

    /**

     * if the new package uses a shared library that is not available.

     * 共享库已丢失

     */

    public static final int INSTALL_FAILED_MISSING_SHARED_LIBRARY = -9;

    /**

     * if the new package uses a shared library that is not available.

     * 替换时无法删除

     */

    public static final int INSTALL_FAILED_REPLACE_COULDNT_DELETE = -10;

    /**

     * if the new package failed while optimizing and validating its dex files,

     *   either because there was not enough storage or the validation failed.

     * 空间不足或验证失败

     */

    public static final int INSTALL_FAILED_DEXOPT = -11;

    /**

     * if the new package failed because the current SDK version is older than

     * that required by the package.

     * 系统版本过旧

     */

    public static final int INSTALL_FAILED_OLDER_SDK = -12;

    /**

     * if the new package failed because it contains a content provider with the

     *   same authority as a provider already installed in the system.

     * 存在同名的内容提供者

     */

    public static final int INSTALL_FAILED_CONFLICTING_PROVIDER = -13;

    /**

     * if the new package failed because the current SDK version is newer than

     *   that required by the package.

     * 系统版本过新

     */

    public static final int INSTALL_FAILED_NEWER_SDK = -14;

    /**

     * if the new package failed because it has specified that it is a test-only

     *   package and the caller has not supplied the {@link #INSTALL_ALLOW_TEST}

     *   flag.

     * 调用者不被允许测试的测试程序

     */

    public static final int INSTALL_FAILED_TEST_ONLY = -15;

    /**

     * if the package being installed contains native code, but none that is

     *   compatible with the the device's CPU_ABI.

     * 包含的本机代码不兼容CPU_ABI

     */

    public static final int INSTALL_FAILED_CPU_ABI_INCOMPATIBLE = -16;

    /**

     * if the new package uses a feature that is not available.

     * 使用了一个无效的特性

     */

    public static final int INSTALL_FAILED_MISSING_FEATURE = -17;

// ------ Errors related to sdcard

    /**

     * if a secure container mount point couldn't be accessed on external media.

     * SD卡访问失败

     */

    public static final int INSTALL_FAILED_CONTAINER_ERROR = -18;

    /**

     * if the new package couldn't be installed in the specified install location.

     * 无效的安装路径

     */

    public static final int INSTALL_FAILED_INVALID_INSTALL_LOCATION = -19;

    /**

     * if the new package couldn't be installed in the specified install

     *   location because the media is not available.

     * SD卡不可用

     */

    public static final int INSTALL_FAILED_MEDIA_UNAVAILABLE = -20;

    /**

     * if the new package couldn't be installed because the verification timed out.

     * 验证超时

     */

    public static final int INSTALL_FAILED_VERIFICATION_TIMEOUT = -21;

    /**

     * if the new package couldn't be installed because the verification did not succeed.

     * 验证失败

     */

    public static final int INSTALL_FAILED_VERIFICATION_FAILURE = -22;

    /**

     * if the package changed from what the calling program expected.

     * 预期的应用被改变

     */

    public static final int INSTALL_FAILED_PACKAGE_CHANGED = -23;

    /**

     * if the parser was given a path that is not a file, or does not end

     *   with the expected '.apk' extension.

     * 解析失败,不是APK

     */

    public static final int INSTALL_PARSE_FAILED_NOT_APK = -100;

    /**

     * if the parser was unable to retrieve the AndroidManifest.xml file.

     * 解析失败,无法提取Manifest

     */

    public static final int INSTALL_PARSE_FAILED_BAD_MANIFEST = -101;

    /**

     * if the parser encountered an unexpected exception.

     * 解析失败,无法预期的异常

     */

    public static final int INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION = -102;

    /**

     * if the parser did not find any certificates in the .apk.

     * 解析失败,找不到证书

     */

    public static final int INSTALL_PARSE_FAILED_NO_CERTIFICATES = -103;

    /**

     * if the parser found inconsistent certificates on the files in the .apk.

     * 解析失败,证书不一致

     */

    public static final int INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES = -104;

    /**

     * if the parser encountered a CertificateEncodingException in one of the

     *   files in the .apk.

     * 解析失败,证书编码异常

     */

    public static final int INSTALL_PARSE_FAILED_CERTIFICATE_ENCODING = -105;

    /**

     * if the parser encountered a bad or missing package name in the manifest.

     * 解析失败,manifest中的包名错误或丢失

     */

    public static final int INSTALL_PARSE_FAILED_BAD_PACKAGE_NAME = -106;

    /**

     * if the parser encountered a bad shared user id name in the manifest.

     * 解析失败,manifest中的共享用户错误

     */

    public static final int INSTALL_PARSE_FAILED_BAD_SHARED_USER_ID = -107;

    /**

     * if the parser encountered some structural problem in the manifest.

     * 解析失败,manifest中出现结构性错误

     */

    public static final int INSTALL_PARSE_FAILED_MANIFEST_MALFORMED = -108;

    /**

     * if the parser did not find any actionable tags (instrumentation or application)

     *   in the manifest.

     * 解析失败,manifest中没有actionable tags

     */

    public static final int INSTALL_PARSE_FAILED_MANIFEST_EMPTY = -109;

    /**

     * if the system failed to install the package because of system issues.

     * 系统问题导致安装失败

     */

    public static final int INSTALL_FAILED_INTERNAL_ERROR = -110;

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Android OTA(Over-The-Air)升级是指通过网络传输直接在设备上进行系统升级的一种方法。下面简要介绍Android OTA升级的流程以及常见问题分析。 Android OTA升级流程通常包括以下几个步骤: 1. 系统准备:开发者根据新版本的要求,为设备准备升级所需的系统文件。这些文件包括操作系统文件、应用程序文件以及升级脚本等。 2. 设备请求:设备通过连接到网络,并向服务器请求最新的系统升级。服务器根据设备的型号和当前系统版本,判断是否需要进行升级。 3. 传输升级文件:如果服务器确认设备需要进行升级,那么就会将升级文件传输给设备。这通常是通过HTTP或FTP等协议进行数据传输。 4. 升级验证:设备接收到升级文件后,会进行文件校验,以确保文件的完整性和一致性。 5. 升级安装:设备在校验通过后,会进行系统升级安装。这通常会涉及到文件解压、系统分区扩展等操作。 6. 安装后处理:升级完成后,设备会重新启动并进行一些后期处理工作,例如数据迁移、应用优化等。 常见问题分析: 1. 升级失败:升级过程中可能出现各种原因导致升级失败,如网络中断、升级文件损坏、设备存储空间不足等。解决方法可以包括重新尝试升级、检查网络连接、清理设备存储空间等。 2. 兼容性问题:新版本的系统可能对设备硬件或软件要求更高,而一些老旧设备可能无法满足这些要求。这可能导致升级后设备性能下降或功能不可用。解决方法可以是提供适配的系统版本或更新设备硬件。 3. 数据丢失:升级过程中可能导致设备的数据丢失,包括联系人、短信、应用程序数据等。为了避免这种问题,可以提醒用户备份数据或提供数据迁移工具。 4. 升级时间过长:升级过程可能需要较长时间,尤其是在升级文件较大或设备性能较低的情况下。解决方法可以是优化升级文件的大小和传输速度,或提供快速升级选项。 总结:Android OTA升级通过网络直接在设备上进行系统升级,流程包括准备、请求、传输、验证、安装和处理。常见问题包括升级失败、兼容性问题、数据丢失和升级时间过长等,需要通过合适的解决方法来处理。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值