使用adb install安装应用程序时出现INSTALL_FAILED_PACKAGE_CHANGED错误

问题描述 投票:0回答:1

当我尝试使用 adb install 命令更新应用程序时,出现错误

Failure [INSTALL_FAILED_PACKAGE_CHANGED: installPackageLI]
。我尝试在 android 源代码中搜索错误,但该错误没有有意义的记录。以下行来自 android 源

    /**
     * Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
     * if the package changed from what the calling program expected.
     *
     * @hide
     */
    @SystemApi
    public static final int INSTALL_FAILED_PACKAGE_CHANGED = -23;

但是解释很模糊,我不知道这个错误的原因是什么。

android adb android-source
1个回答
0
投票

检查您是否在 Manifest 文件中添加了

android:testOnly="true"

并将其更改为

android:testOnly="false"

© www.soinside.com 2019 - 2024. All rights reserved.