0

When i am making apk for google play, the result i have in the folder \platforms\android\build\outputs\apk is apt-debug which is not acceptable by google play.
How can i make production version of the app? Command line i am executing is phonegap build android.
I have searched for option in config.xml without success.
I am using Windows 10, x64. I have installed latest version of Java and Android studio, but i guess that is not important.
EDIT:
I am trying to add sign to released apk.

keytool -genkey -v -keystore ProjectName.keystore -alias ProjectName -validity 1

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ProjectName.keystore android-release-unsigned.apk ProjectName

zipalign.exe -v 4 android-release-unsigned.apk.sig Release.apk

which give me this error: Your APK cannot be analyzed using aapt. Error output

Honchar Denys
  • 1,408
  • 4
  • 29
  • 54
  • you need to make release apk file top submit on store. apk-debug won't accept by apple store.. please go through http://stackoverflow.com/questions/26449512/how-to-create-signed-apk-file-using-cordova-command-line-interface for make relase apk hope it will help – Naitik Aug 04 '16 at 09:47
  • Thanks, trying to do that. – Honchar Denys Aug 04 '16 at 09:48

1 Answers1

1

This is for Phonegap 3.0.x to 3.3.x. For PhoneGap 3.4.0 and higher see below.

Found part of the answer here, at Phonegap documentation. The full process is the following:

  1. Open a command line window, and go to /path/to/your/project/platforms/android/cordova.

  2. Run build --release. This creates an unsigned release APK at /path/to/your/project/platforms/android/bin folder, called YourAppName-release-unsigned.apk.

  3. Sign and align the APK using the instructions at android developer official docs.

Thanks to @LaurieClark for the link (http://iphonedevlog.wordpress.com/2013/08/16/using-phonegap-3-0-cli-on-mac-osx-10-to-build-ios-and-android-projects/), and the blogger who post it, because that put me on the track.

Community
  • 1
  • 1
Hardik Vaghani
  • 2,163
  • 24
  • 46