开发者

Signing APK by commandline

I am developing android applications with Eclipse and the Android SDK. For testing the app on a device it is pretty embarrasing to do the same job every time:

  • Android Tools
  • Export Signed Application Package
  • Select project
  • Select keystore
  • Use password
  • Select alias
  • Use password
  • Select output path & file

After that using commandline and adb to uninstall previous version of the installed app. Then installing new version of the app.

As this way is mich too long I wanted to script the whole action, but the jarsigner is always stopping with same error and I can't sign the apk.

unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 761 but got 763 bytes)

At this point I am pretty confused. The jarsigner is from JDK 1.6.0.26. Eclipse is at Version 3.6.2. Android SDK is complete up-to-date. I am working under Windows Vista 32-bit.

Has anyone similar problems with th开发者_运维知识库e jarsigner or can give me some tips?!


Why don't you just debug the app on your phone?

This is how to do it:

  1. First, download and install your phone's drivers (find via a Google search)
  2. Debug the project in eclipse as you would on an emulator in eclipse, but when eclipse tells you to choose a device, pick your phone.

This way, you won't have to export the app, and you can debug on a decent device - i.e. not an emulator.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜