How to export signed Android Package?

I want to export my finished game signed, not in debug-mode. but when i go to tools, export signed… this is not available in jme project, how do i have to do this?

You have to set the key.store path and key.alias properties in the project.properties of your JME project (it’s in the nbproject folder)



key.store=local path to your keystore

key.alias=the name of your keystore.



then when building you’ll be prompted for password (there are one for the keystore, and one for the keyalias).

This build will generate your apk and sign it (appName-release.apk), in the dist folder of your JME project.

it seems not to work for me :frowning:



i found this in project.properties:



jnlp.signed=true // this was false before

jnlp.signing=true // this one was empty

jnlp.signing.alias=XY

jnlp.signing.keystore=C:\XY



if i try it with this options nothing changes when i build and run project, jme still creates project with debug-key :frowning:

@schloder87 said:
jnlp.signed=true // this was false before
jnlp.signing=true // this one was empty
jnlp.signing.alias=XY
jnlp.signing.keystore=C:\XY

if i try it with this options nothing changes when i build and run project, jme still creates project with debug-key :(

....yeah... because that's the configuration to sign a jnlp....not an apk.

Do what i said : add the 2 lines in project.properties, but make sur eit's the one in yourProjectRoot/nbproject. There is another project.properties in the mobile/nbproject folder but that's not the one to use.

the key.store and key.alias properties are not there by default, you have to add them.
@nehon said:
There is another project.properties in the mobile/nbproject folder but that's not the one to use.

Orly, that one doesn't work? Thats the one I add to the "Important Files" node so users have access..

yeah, each time i see it i say to myself " ho…i got to tell Normen", and i always forget :stuck_out_tongue:

Also this one can be useful for other things, but the signing info has to be in the project.properties of the JME project.

@nehon said:
but the signing info has to be in the project.properties of the JME project.

dafuq? why? is it not imported or is the same name created in the main build file and carried over?

can you give me some detailed tut? i tried like you said, but nothing works :frowning:



normen, kannst du mir das evtl. bitte auf deutsch erklären? ich verzweifle gerade…

Na gut, ausnahmsweise :stuck_out_tongue: Ich glaub’ aber da sind nich’ viele deutsche Worte in der Erklärung ^^



In nbproject/project.properties die beiden Zeilen eintragen:

[java]key.store=…/pfad/zum/keystore

key.alias=alias_name

[/java]

Wegen den Viren brauchst Du 'nen offiziellen Keystore, niemand installiert selbst-signierte Apps mehr, ansonsten gibt’s hier Infos wie man mit dem keytool selber einen macht: http://developer.android.com/tools/publishing/app-signing.html

z.B.

[java]keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000[/java]

@schloder87 said:
normen, kannst du mir das evtl. bitte auf deutsch erklären? ich verzweifle gerade..


translated - "normen can you help me plz? I have itchy balls"

ok hab jetzt einen schlüssel generiert. die zwei zeilen bei nbproject/project.properties eingefügt. wenn ich jetzt auf run main project gehe, sehe ich im output immer noch:



Creating “meinProject”-debug-unaligned.apk and signing it with a debug key…



muss ich noch etwas berücksichtigen?

Build, nicht run. Die apk liegt dann im dist folder.

Ok, hat geklappt! Danke für den tollen Support hier, Normen :slight_smile:

ok next problem.



Output says:



No key.store and key.alias properties found in build.properties.