错误未知失败(在 android.os.Binder.execTransact(Binder.java:565))安装 APK 时出错

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/44202530/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 01:25:05  来源:igfitidea点击:

error Unknown failure (at android.os.Binder.execTransact(Binder.java:565)) Error while Installing APKs

javaandroidapk

提问by Tsur Yohananov

Could somebody tell me what that means?

有人能告诉我这是什么意思吗?

Everything went fine, I haven't changed anyhing and it just happened, this is the code in Binder 565:

一切顺利,我没有改变任何东西,它只是发生了,这是 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;
}

回答by An?e Mur

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.

当我尝试在模拟器上安装 apk 时遇到了这个问题,我总是收到错误消息,提示我需要卸载旧版本的应用程序 apk。

I solved it like this:

我是这样解决的:

1. File -> Settings -> Build, Execution, Deployment.

1. 文件 -> 设置 -> 构建、执行、部署。

2. Instant Run -> disable "Enable Instant Run to hot swap code/resource changes on deploy".

2. Instant Run -> 禁用“启用 Instant Run 以在部署时热插拔代码/资源更改”。

3. Apply -> OK

3. 申请 -> 确定

After that you can clean the project (Build -> Clean project)and re-enable instant run to get the instant run working again.

之后,您可以清理项目(构建 -> 清理项目)并重新启用即时运行以使即时运行再次运行。

EDIT (Android Studio 3.0)

编辑(Android Studio 3.0)

Disable Instant Run (Android Document)

禁用 Instant Run(Android 文档

To disable Instant Run:

要禁用即时运行:

  1. Open the Settingsor Preferencesdialog. (For Mac, Android Studio-> Preferences)
  2. Navigate to Build, Execution, Deployment> Instant Run.
  3. Uncheck the box next to Enable Instant Run.
  1. 打开设置首选项对话框。(对于 Mac,Android Studio->首选项
  2. 导航到构建、执行、部署>即时运行
  3. 取消选中Enable Instant Run旁边的框。

回答by visc

I had a similar error message. Turns out my systems and/or emulator ran out of storage space and it's couldn't install the APK. Mithor's solution revealed to out of space memory error. I was then able to enable instant run after freeing up some space.

我有类似的错误消息。原来我的系统和/或模拟器存储空间不足,无法安装 APK。Mithor 的解决方案揭示了内存不足错误。然后我能够在释放一些空间后启用即时运行。

回答by SimpleCoder

This is usually because your device and your JNI do not match. For example, your device is X86 ABI, but you use the JNI for ARM.

这通常是因为您的设备和 JNI 不匹配。例如,您的设备是 X86 ABI,但您使用的是 ARM 的 JNI。

回答by Nevdev

Your solution worked with mine but the problem reoccurred on enable it back even when the app ran successfully. Then, following the Build Projectdocumentation in Android Documentationas advised by Dhaval Jardosh, performing a clean project the app started to run with the Instant Runenabled.

您的解决方案适用于我的解决方案,但即使应用程序成功运行,问题也会在重新启用时再次发生。然后,按照Dhaval Jardosh 的建议,按照Android 文档中构建项目文档,执行一个干净的项目,应用程序开始运行并启用Instant Run

回答by Andres Navarro

Hi i disabled INSTANT RUN and works like a charm.

嗨,我禁用了 INSTANT RUN 并像魅力一样工作。

回答by Regis_AG

This crash appeared suddenly without any reason. I just restarted Android Studio and my device ; and it worked. I don't know if both solutions or just one of them is required.

这次崩溃突然出现,没有任何原因。我刚刚重新启动了 Android Studio 和我的设备;它奏效了。我不知道是需要两种解决方案还是只需要其中一种。

Check also that there is enough space disk on your device to install the app. Actually, even if your app is 10 Mo, there might be this problem if you have 300 Mo or less available on your device.

还要检查您的设备上是否有足够的磁盘空间来安装该应用程序。实际上,即使您的应用程序是 10 Mo,如果您的设备上有 300 Mo 或更少的可用时间,也可能会出现此问题。

回答by pravingaikwad07

Unknown failure (at android.os.Binder.execTransact(Binder.java:702)) Error while Installing APK

未知失败(在 android.os.Binder.execTransact(Binder.java:702))安装 APK 时出错

There could be 2 Possible solutions for this error :

此错误可能有 2 种可能的解决方案:

Solution 1: Check that you have enabled "INSTALL VIA USB" option in 'Developer Options' in Mobile (especially if you are using Xiomi devices)

解决方案 1:检查您是否已在手机的“开发人员选项”中启用“通过 USB 安装”选项(特别是如果您使用的是小米设备)

Solution 2: https://stackoverflow.com/a/46102740/5582162- Solution posted by @Mithor.

解决方案 2:https://stackoverflow.com/a/46102740/5582162 - @Mithor 发布的解决方案。

回答by Matej Ko?út

I had a similar error message. In my case, it was because I changed the folder of my project. I moved the project to another folder and when I tried to install apk to my device it failed with a similar error. Deleting of data, uninstalling the old app, cleaning the project and building the new apk helped in my case.

我有类似的错误消息。就我而言,这是因为我更改了项目的文件夹。我将项目移动到另一个文件夹,当我尝试将 apk 安装到我的设备时,它因类似错误而失败。删除数据、卸载旧应用程序、清理项目和构建新的 apk 对我的情况有所帮助。

回答by Manoj Kumar Rai

In my case, I cleaned the project, then rebuilt the code and it worked. And in Mi or Xiomiphone just enabled "INSTALL VIA USB" in developer option.

就我而言,我清理了项目,然后重新构建了代码并且它工作正常。而在Mi or Xiomi手机中,刚刚在开发者选项中启用了“通过 USB 安装”。

回答by Mitesh Patel

I had similar issue. My phone space was very low. I just increased my phone space and it worked for me.

我有类似的问题。我的手机空间非常小。我只是增加了我的手机空间,它对我有用。