Tsur Yohananov
Tsur Yohananov

Reputation: 543

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

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:

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;
}

Upvotes: 38

Views: 53542

Answers (10)

Anže Mur
Anže Mur

Reputation: 1545

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.

I solved it like this:

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

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

3. Apply -> OK

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)

Disable Instant Run (Android Document)

To disable Instant Run:

  1. Open the Settings or Preferences dialog. (For Mac, Android Studio -> Preferences)
  2. Navigate to Build, Execution, Deployment > Instant Run.
  3. Uncheck the box next to Enable Instant Run.

Upvotes: 89

Matej Košút
Matej Košút

Reputation: 570

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.

Upvotes: 0

Manoj Kumar Rai
Manoj Kumar Rai

Reputation: 103

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

Upvotes: 3

Mitesh Patel
Mitesh Patel

Reputation: 485

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

Upvotes: 1

toto_tata
toto_tata

Reputation: 15402

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.

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.

Upvotes: 0

pravingaikwad07
pravingaikwad07

Reputation: 522

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

There could be 2 Possible solutions for this error :

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

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

Upvotes: 8

Andres Navarro
Andres Navarro

Reputation: 137

Hi i disabled INSTANT RUN and works like a charm.

Upvotes: 2

Nevdev
Nevdev

Reputation: 31

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

Upvotes: 1

SimpleCoder
SimpleCoder

Reputation: 1

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.

Upvotes: 0

visc
visc

Reputation: 4959

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.

Upvotes: 5

Related Questions