Jenkins-CI not properly signing apk
I am using Jenkins-CI to 开发者_如何学Gobuild an Android app I'm working on at work. It appears to sign the apk just fine but when I try to install it I'm told that it isn't signing one resource file. I decided to add a shell step after the ant build using jarsigner, again it appears to sign the apk fine but when I download the apk and try an adb install on my desktop I get an INSTALL_PARSE_FAILED_NO_CERTIFICATES
error. Does anyone have a clue what would cause Jenkins-CI to not sign the apk correctly? I am using the same basic config at home and its working great. I'm running out of ideas on what to do here.
Try checking out Creating Your Android-Market-Ready APK
Maybe your Jenkins node is installed on a machine running JDK 7?
I had the same problem.
With JDK 7, the signing process uses the 'SHA256' digest algorithm, which seems to be incompatible with Android.
Unfortunately I haven't found a way to configure this behavior anywhere so my solution was to install JDK 6 on the node (see How can I configure a Hudson job to use a specific JDK? for this).
See also:
- Transitioning Android dev from Linux to Windows: toolchain signes APK differently?
- https://groups.google.com/forum/#!topic/android-developers/JMQsdsKr7-0
- Relevant issue: http://code.google.com/p/android/issues/detail?id=19567
精彩评论