Question

What is the best way to generate an apk file to submit my app to Amazon using Eclipse?

I tried using the Android Tools -> Export Unsigned Application Package... But when I email the apk to my Kindle Fire and try to install it, the install fails with "Application failed to install"

If I grab the apk that eclipse generates in the bin folder and email it to myself, then it installs fine in the Kindle, but this is a debug build.

I would like to produce a release build that will be the one I submit to Amazon and that I can also install wirelessly to my Kindle for testing. I would like to test the same build I submit to Amazon. But I don't know how to generate the build to submit to Amazon either.

Thanks!

Was it helpful?

Solution

You have yo sign your APK to install it.If you want to submit it you should generate a key the APK and sign it properly.

if you want to 'test it' on the device you can send the APK located at your /bin/ folder which is automatically signed with a debug sign

OTHER TIPS

Amazon must put their DRM module into the APK file; therefore, you must sign it after that because writing anything in a signed APK file will invalidate the signature. The following link describe in detail how to manually sign your APK file:

http://developer.android.com/tools/publishing/app-signing.html

To clarify the case with Amazon:

1- Export an unsigned APK file using Eclipse and send this file to Amazon in order for them to put their DRM into it.

2- Create a certificate using the keytool utility as explained in the step 1 of the reference. (You must use a command shell (cmd) for this. Don't forget to set up the correct path for keytool.exe. It should be located in the bin repertory of your java sdk; like "C:\Program Files (x86)\Java\jdk1.6.0_27\bin" ).

Instead of creating a new one, you can also reuse the certificate created by Eclipse when you export a signed application.

Don't forget that you'll have to reuse the same certificate for creating an upgrade; so don't forget the various passwords!

3- You must then sign your APK (as modified by Amazon) using the jarsigner tool and after that, you must align it using the zipalign tool; as explained in the reference. Contrary to the two other tools, the zipalign tool is located under the tools directory of your android-sdk-windows directory; so it will also be wise to add this tools directory into your path.

You might also want to be sure that your icon in the AndroidManifest.xml file is 512x512 resolution, or else things will look a bit pixilated.

<application android:persistent="true"
    android:hardwareAccelerated="true"
    android:icon="@drawable/launcher_icon_512x512"
    android:label="@string/app_name" >
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top