Ryan Coolwebs
Ryan Coolwebs

Reputation: 1631

Can I sign an Android app using Apache Cordova (local build)

Have looked around and I cannot see a clear answer to this question. I can see that the Phonegap Build service can assist with signing and Android APK file for submission into Google Play Store.

I am using Apache cordova locally with CLI to build, test and run my Android/iOS apps. My question is, how do I sign the APK file using Cordova CLI, not PGB? My app is too big for PGB.

Would I have to move the project into Eclipse IDE and do it there?

Upvotes: 2

Views: 2604

Answers (2)

mooreds
mooreds

Reputation: 4978

You do not sign an app with Cordova CLI. Cordova CLI has limited support for platform specific operations, and Android app signing is definitely one of those.

To sign the app (full instructions here: http://developer.android.com/tools/publishing/app-signing.html):

  • Create a keystore (only need to do this once)
  • cd [appname]/platforms/android/
  • edit ant.properties and add these values
    • key.store=[location of keystore]/android-release-key.keystore
    • key.alias=[name of your key]
  • Remove android:debuggable="true" from the AndroidManifest.xml before you run 'ant release'
  • run ant release and enter the passwords as needed

At the end, you should have a signed app ready for upload to Google Play.

Upvotes: 6

Adarsh Nahar
Adarsh Nahar

Reputation: 319

with eclipse you can sign you apk very easily.

Just right click on project and got to Android Tools-> Export Signed Application Package-> click Next-> Select Create new keystore-> browse location and enter passowrd for keystore -> click Next->fill all information and finish the process.

Now you have a signed apk which you can install on any android device.

Hope this helps..

Thanks

Upvotes: 0

Related Questions