自己在安装 Gboard 时,下载完成后提示 505
然后尝试使用 adb 安装,报错如下:
adb install LatinImeGoogle.apk Failed to install LatinImeGoogle.apk: Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install com.google.android.inputmethod.latin without first uninstalling package running as com.android.inputmethod.latin]
这个意思是有相同包名的应用?
用 adb 卸载了,还是会报同样的错。 Android 卸载应用后是不是还有其它地方存留着信息,导致同名包无法安装
1
lack006 2018-06-06 18:12:06 +08:00 via Android 1
adb install -r LatinImeGoogle.apk 试试
|
3
runking OP 使用 adb 卸载时的信息
adb uninstall com.android.inputmethod.latin Exception occurred while executing: java.lang.IllegalArgumentException: Unknown package: com.android.inputmethod.latin at com.android.server.pm.Settings.isOrphaned(Settings.java:4482) at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:22442) at com.android.server.pm.PackageManagerService.deletePackageVersioned(PackageManagerService.java:19417) at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:913) at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:919) at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:141) at android.os.ShellCommand.exec(ShellCommand.java:96) at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:22786) at android.os.Binder.shellCommand(Binder.java:591) at android.os.Binder.onTransact(Binder.java:491) at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2684) at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3851) at android.os.Binder.execTransact(Binder.java:692) |
4
runking OP 自己试出来的办法:
打开 /data/system/package.xml 删除如下内容 <renamed-package new="com.google.android.inputmethod.latin" old="com.android.inputmethod.latin" /> |