问题
I want to generate an new ".apk" file on the phone (a function in my app-market like app), and I have to sign it before install it. I think I have to run the JarSigner on the phone.
JarSigner is found in the following two project: OpenJDK and GCC-libjava.
I have tried to include OpenJDK.jar I downloaded from Internet but it doesn't have JarSigner class in it.
I also have tried to add JarSigner.java from OpenJDK source to my Android APP Project, but the dependencies are way too much. Same with JarSigner.java from GCC-LibJAVA.
it's too difficult to implement a new JarSigner for Android.
回答1:
If you want to create .apk using your phone , have a look at this :
JavaIDEdroid allows you to create native Android applications on Android devices.
http://code.google.com/p/java-ide-droid/
回答2:
I successfully signed my application on my Android device with my own key using the "ZipSigner" Android aplication, Licensed under Apache 2.0. Application site: https://sites.google.com/site/zipsigner/ At Google play: https://play.google.com/store/apps/details?id=kellinwood.zipsigner2
See the screenshot:
BTW, 1. All previous steps of the application build may be done in the TerminalIde Android application ( http://www.spartacusrex.com/terminalide.htm ). Unfortunately, current version of the application doesn't support signing with custom keys. 2. The ZipSigner application is part of the "zip-signer" Open Source project: https://code.google.com/p/zip-signer/
来源:https://stackoverflow.com/questions/14018002/how-to-sign-apk-file-on-an-android-phone