Search code examples
javaandroidlibgdxapknetbeans-8

LibGDX generate a signed APK [NetBeans]


How do you generate a signed APK for a LibGDX project? I have had a look at this page. However, it does not indicate how to build a signed APK with NetBeans.


Solution

  • If you can generate unsigned apk then there easy way to signed apk in command line. First of all you sould to create your apk key using command:

    keytool -genkey -v -keystore "C:\Users\alex\Desktop\my-release-key.jks" -keyalg RSA -keysize 2048 -validity 10000 -alias AliasForMyApp
    

    You should enter at least one of the fields, for example City or Name. More about this can find in official tutorial.

    In next step using jarsigner tool sign the applcation:

    jarsigner -verbose -keystore "c:/users/alex/desktop/my-release-key.jks" -storepass passformyapp -keypass passformykey "c:/users/alex/desktop/app-release-unsigned.apk" AliasForMyApp
    

    You can find more information and examples about this tools. Without Android Studio, I know only this method.