2

I just built a basic Cordova image, but I can't install it on my Android phone.

It says the package is corrupted.

I have enabled "Trust unknown sources" and copied the file onto my Nexus 6P.

The build process doesn't throw any errors, it creates a android-release-unsigned.apk file as expected.

Jelle De Loecker
  • 20,999
  • 27
  • 100
  • 142
  • Hi, did you find a solution for this ? – f0rza Jul 21 '17 at 13:59
  • I have the same problem, although the guide I followed: https://stackoverflow.com/questions/26449512/how-to-create-a-signed-apk-file-using-cordova-command-line-interface was updated this past February. – Tony Oct 27 '17 at 15:45

1 Answers1

-1

Had the same problem as you because I followed the guide I linked in the comments above; that guide is for building a release build, not a test build.

In order to build a test build, do:

cordova build android

Which should create a file called debug-build.apk

In addition, if you have an android device set up for development, you can run:

cordova run android --device
Tony
  • 230
  • 4
  • 11