Installation failed due to: 'null' - Android Studio 3.5

Solution 1:

Open Run/Debug Configuration dialog (Windows: Run > Edit Configurations)

edit You app > General > Installation Options > Install Flags .

add install flags -r -t.

This flags means adb install -r -t apkpath

screen pic

Solution 2:

You need disable "Use libusb backend" in preferences--> debugger enter image description here

Solution 3:

This issue in Android Studio happens for devices lower then API 26 (Android 8). This is caused by replacement of InstantRun, known now as ApplyChanges.

Seems to be there are only two ways before they fix it in the next update.

  1. Run on API>=26.
  2. After every change in code edit run configuration changing deploy from APK to App bundle and vise-versa. If I correctly understand, this will correctly rebuild app and workaround bug.

Of course, there is an option to manually delete app from device before running app from AndroidStudio.

Solution 4:

Build > Clean project its work's for me. Before change other setting try this first.

Happy coding :)

Solution 5:

For me either uninstalling the app or cleaning project "solves" the problem. To make it less frustrating I added clean job to debug build type like so:

buildTypes {
    ...
    debug {
        clean
    }
    ...
}