1

I am trying to create an .apk file for my mobile using cordova (Android) platform on ubuntu 14.04.

for unsigned i used command

$ cordova build --release android

or, $ cordova build android --release

it is creating an CordovaApp-release-unsigned.apk in ant-build folder but while installing this the app gives error app not installed.

Note : i also want to build an release app using my name say xyz.apk.

# OS: Ubuntu 14.04
# Platform : Android
# Framework : cordova 

Please help post a best answer.

Thanks

DebuggerCoder
  • 236
  • 4
  • 15

2 Answers2

3

Create a keystock for signed apk

a.  keytool -genkey -v -keystore NAME-mobileapps.keystore -alias NAMEmobileapps -keyalg RSA -keysize 2048 -validity 10000
b.  create a file inside android folder using name "ant.properties"
c.  Add these line with your keystock full path and alise name.
    key.store=/home/chandradeo/xxx.keystore
    key.alias=xxx

Run command

$ cordova build android --release

or

$ cordova build --release android

This will give you both signed and unsigned apk under ant-build folder

Thanks

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
DebuggerCoder
  • 236
  • 4
  • 15
1

For you to be able to install the unsigned package in your device, you need to allow installation from unknown sources. It can be done in Settings -> General (tab) -> Security where you need to check the Unknown sources check box. After that the install should work.

If you want to sign your application to be deployable to for example Play store, you need to refer to Android tutorial on that subject. you can also find steps for this from Stack Overflow. Once you have signed your .apk, you don't need to allow the unknown sources anymore.

Community
  • 1
  • 1
Roope Hakulinen
  • 7,326
  • 4
  • 43
  • 66