错误未知失败(在 android.os.Binder.execTransact(Binder.java:565))安装 APK 时出错 [英] error Unknown failure (at android.os.Binder.execTransact(Binder.java:565)) Error while Installing APKs
问题描述
谁能告诉我这是什么意思?
Could somebody tell me what that means?
一切都很好,我没有改变任何东西,它只是发生了,这是 Binder 565 中的代码:
Everything went fine, I haven't changed anyhing and it just happened, this is the code in Binder 565:
try {
res = onTransact(code, data, reply, flags);
} catch (RemoteException | RuntimeException e) {
if (LOG_RUNTIME_EXCEPTION) {
Log.w(TAG, "Caught a RuntimeException from the binder stub implementation.", e);
}
if ((flags & FLAG_ONEWAY) != 0) {
if (e instanceof RemoteException) {
Log.w(TAG, "Binder call failed.", e);
} else {
Log.w(TAG, "Caught a RuntimeException from the binder stub implementation.", e);
}
} else {
reply.setDataPosition(0);
reply.writeException(e);
}
res = true;
}
推荐答案
当我尝试在模拟器上安装 apk 时遇到了这个问题,我总是收到错误消息,提示我需要卸载旧版本的应用程序 apk.
I had this issue when I was trying to install apk on emulator and I was always getting error messages that I need to uninstall the old version of my app's apk.
我是这样解决的:
1.文件 -> 设置 -> 构建、执行、部署.
2.Instant Run -> 禁用启用 Instant Run 以在部署时热插拔代码/资源更改".
3.应用 -> 确定
之后您可以清理项目(构建 -> 清理项目)并重新启用即时运行以使即时运行再次运行.
After that you can clean the project (Build -> Clean project) and re-enable instant run to get the instant run working again.
禁用 Instant Run(Android 文档)
Disable Instant Run (Android Document)
要禁用即时运行:
- 打开设置或首选项对话框.(对于 Mac,Android Studio -> 首选项)
- 导航至构建、执行、部署 > 即时运行.
- 取消选中启用即时运行旁边的框.
- Open the Settings or Preferences dialog. (For Mac, Android Studio -> Preferences)
- Navigate to Build, Execution, Deployment > Instant Run.
- Uncheck the box next to Enable Instant Run.
这篇关于错误未知失败(在 android.os.Binder.execTransact(Binder.java:565))安装 APK 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!