I updated my ADT plugin within Eclipse IDE on April 13th and now it won't export my projects with the apk file extension. Can someone please help me fix this? I can't figure out what's wrong. Thank you in advance.
Had the same problem. Here's how I fixed it.
First open CMD as Administrator and set the current directory to your [JAVA_FOLDER]\\bin
Type the following to generate your keystore (You'll be asked for a password). Your parameters go where the bracketed text is.
keytool -genkey -v -keystore [keystore-name.keystore] -alias [key-alias] -keyalg RSA -keysize 2048 -validity 10000
In ADT/Eclipse, right click on your project folder, select Android Tools >> Export Unsigned Application Package
Sign your unsigned apk using the generated keystore with this
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore [keystore-name].keystore unsigned.apk [key_alias]
Verify you signed it correctly with
jarsigner -verify [signed-apk].apk
Your apk is now signed an can be distributed. However, it is recommended to DWORD align the file. So, in CMD, navigate to your [Android SDK folder]\\tools and type the following
zipalign -v 4 [path-to-unaligned].apk [path-to-final].apk
Your apk is finally ready for distribution.
NOTE : What I did was let keytool.exe save the keystore in the JAVA bin directory and then moved it to a secure location afterwards.
You can make batch script so you don't type a lot.
For more information:
http://developer.android.com/tools/publishing/app-signing.html
I fixed my problem. I was using the recommended Eclipse Mobile referenced on the android dev website but I installed Eclipse Indigo instead with the ADT v21 plugin and it works perfectly now with exporting .apk file extensions. Hope this helps anyone with the same issue.
So in short: The answer to Eclipse not being able to export .apk files is to use Eclipse Indigo instead.
Which can be found here: http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/indigosr2
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.