'Unable to install debug APK on physical device when running react-native run-android - Failed to parse APK file: /data/local/tmp/app-debug.apk

enter image description here

Tried

  • cleaning the android build folder
  • restarting the device
  • cleaning the npm cache but nothing works.

And also unable to install the debug.apk manually - says apk is corrupted.

AndroidManifest.xml looks clean. Any help would be really appreciated because stuck here for hours.



Solution 1:[1]

The issue was there were multiple modules in my app which was created by me and those apps had different gradle versions. After I matched them the issues were gone.

-classpath("com.android.tools.build:gradle:4.2.2")
+classpath("com.android.tools.build:gradle:3.5.3")

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1