View Full Version : Android Native Build - Release build gives a jarsigner error

10 Apr 2012, 6:53 AM

I'm trying to build my application for Android for releasing onto Google Play for distribution. When I try and use the release key I generated using keytool and the password I have assigned, I get the following error during the build:

C:\Sencha\Projects\PPTouch>sencha app build native
[INFO] Deploying your application to C:\Sencha\Projects\PPTouch\build\package
[INFO] Copied sdk-2.0.0-backup/sencha-touch.js
[INFO] Copied Lib/markerwithlabel.js
[INFO] Copied Lib/markermanager.js
[INFO] Copied Scripts/HistoryMarkerManager.js
[INFO] Copied app.js
[INFO] Copied resources/css/app.css
[INFO] Copied resources/css/pptouch.css
[INFO] Copied resources/images
[INFO] Copied resources/icons
[INFO] Copied resources/loading
[INFO] Resolving your application dependencies (file:///C:/Sencha/Projects/PPTou
[INFO] Found 233 dependencies. Concatenating all into 'C:\Sencha\Projects\PPTouc
[INFO] Processed sdk-2.0.0-backup/sencha-touch.js
[INFO] Minifying sdk-2.0.0-backup/sencha-touch.js
[INFO] Processed Lib/markerwithlabel.js
[INFO] Minifying Lib/markerwithlabel.js
[INFO] Processed Lib/markermanager.js
[INFO] Minifying Lib/markermanager.js
[INFO] Processed Scripts/HistoryMarkerManager.js
[INFO] Minifying Scripts/HistoryMarkerManager.js
[INFO] Processed app.js
[INFO] Minifying app.js
[INFO] Minifying resources/css/app.css
[INFO] Minifying resources/css/pptouch.css
[INFO] Minified sdk-2.0.0-backup/sencha-touch.js
[INFO] Minified Lib/markerwithlabel.js
[INFO] Minified Scripts/HistoryMarkerManager.js
[INFO] Minified Lib/markermanager.js
[INFO] Minified resources/css/pptouch.css
[INFO] Minified app.js
[INFO] Minified resources/css/app.css
[INFO] Generated app.json
[INFO] Embedded microloader into index.html
[INFO] Packaging your application as a native app...
[INFO] Created directory C:\Sencha\Projects\PPTouch\build\nativeAndroid\src\sbs\
Added file C:\Sencha\Projects\PPTouch\build\nativeAndroid\src\sbs\pinpointers\pp
Created directory C:\Sencha\Projects\PPTouch\build\nativeAndroid\res
Created directory C:\Sencha\Projects\PPTouch\build\nativeAndroid\bin
Created directory C:\Sencha\Projects\PPTouch\build\nativeAndroid\libs
Created directory C:\Sencha\Projects\PPTouch\build\nativeAndroid\res\values
Added file C:\Sencha\Projects\PPTouch\build\nativeAndroid\res\values\strings.xml

Created directory C:\Sencha\Projects\PPTouch\build\nativeAndroid\res\layout
Added file C:\Sencha\Projects\PPTouch\build\nativeAndroid\res\layout\main.xml
Added file C:\Sencha\Projects\PPTouch\build\nativeAndroid\AndroidManifest.xml
Added file C:\Sencha\Projects\PPTouch\build\nativeAndroid\build.xml
Added file C:\Sencha\Projects\PPTouch\build\nativeAndroid\proguard.cfg
Buildfile: C:\Sencha\Projects\PPTouch\build\nativeAndroid\build.xml




[echo] Gathering info for PinpointersTouch...
[setup] Android SDK Tools Revision 16
[setup] Project Target: Android 2.1
[setup] API level: 7
[setup] ------------------
[setup] Resolving library dependencies:
[setup] No library dependencies.
[setup] ------------------

[echo] Creating output directories if needed...
[mkdir] Created dir: C:\Sencha\Projects\PPTouch\build\nativeAndroid\bin\res
[mkdir] Created dir: C:\Sencha\Projects\PPTouch\build\nativeAndroid\gen
[mkdir] Created dir: C:\Sencha\Projects\PPTouch\build\nativeAndroid\bin\clas


[echo] ----------
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[renderscript] No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...


[javac] Compiling 2 source files to C:\Sencha\Projects\PPTouch\build\nativeA



[dex] Converting compiled files and external libraries into C:\Sencha\Proj

[crunch] libpng error: Read Error
[crunch] libpng error: Read Error
[crunch] libpng error: Read Error
[crunch] Crunching PNG Files in source dir: C:\Sencha\Projects\PPTouch\build\
[crunch] To destination dir: C:\Sencha\Projects\PPTouch\build\nativeAndroid\b
[crunch] Processing image to cache: C:\Sencha\Projects\PPTouch\build\nativeAn
droid\res\drawable-hdpi\icon.png => C:\Sencha\Projects\PPTouch\build\nativeAndro
[crunch] Processing image to cache: C:\Sencha\Projects\PPTouch\build\nativeAn
droid\res\drawable-ldpi\icon.png => C:\Sencha\Projects\PPTouch\build\nativeAndro
[crunch] Processing image to cache: C:\Sencha\Projects\PPTouch\build\nativeAn
droid\res\drawable-mdpi\icon.png => C:\Sencha\Projects\PPTouch\build\nativeAndro
[crunch] Crunched 3 PNG files to update cache

[aapt] Creating full resource package...

[apkbuilder] Current build type is different than previous build: forced apkbuil
der run.
[apkbuilder] Creating PinpointersTouch-release-unsigned.apk for release...


[echo] No key.store and key.alias properties found in build.properties.
[echo] Please sign C:\Sencha\Projects\PPTouch\build\nativeAndroid\bin\Pinpo
intersTouch-release-unsigned.apk manually
[echo] and run zipalign from the Android SDK tools.
[propertyfile] Creating new property file: C:\Sencha\Projects\PPTouch\build\nati
[propertyfile] Updating property file: C:\Sencha\Projects\PPTouch\build\nativeAn
[propertyfile] Updating property file: C:\Sencha\Projects\PPTouch\build\nativeAn
[propertyfile] Updating property file: C:\Sencha\Projects\PPTouch\build\nativeAn


Total time: 6 seconds
""C:/AndroidSDK/android-sdk/tools/android" create project --target android-7 --n
ame PinpointersTouch --activity STActivity --path "C:\Sencha\Projects\PPTouch\bu
ild\nativeAndroid/" --package sbs.pinpointers.pptouch"
Could not sign application with error: 1
Failed to package application
[ERROR] 'jarsigner' is not recognized as an internal or external command,
operable program or batch file.
Copy operation failed src=C:\Sencha\Projects\PPTouch\build\package//icon.png dst
Copy operation failed src=C:\Sencha\Projects\PPTouch\build\package//icon.png dst
Copy operation failed src=C:\Sencha\Projects\PPTouch\build\package//icon.png dst


This works fine in debug mode using my debug key, so I can only assume its something to do with my release key but I am unsure what.

Here is my config file too:

"applicationName":"Pinpointers Touch",
"certificatePassword": "<password>",
"orientations": [

Any advice on what could be causing me this jarsigner error?


10 Apr 2012, 7:30 AM
I discovered that my Environment Variables on my machine were not setup correctly.

I'm using Windows 7 64 bit and had to add a PATH variable mapped to the bin directory of where the jdk is on my machine (C:\Program Files\Java\jdk1.7.0_03\bin).

I already had a JAVA_HOME which is mapped a level up (C:\Program Files\Java\jdk1.7.0_03).

The Release version of the build is now packaging for me, although I cant upload it to Google Play as it expects the apk file to have a 48 x 48 icon which it says is not present.

In fact I have already posted a separate thread on this issue where although the native build completes, the launcher icon I specify in my config file never gets used and I end up with a 'res' folder in the output directory as well as the apk file. This res folder contains 'drawable-' prefixed named folders each containing a zero sized png which doesnt open for viewing. Frustrating as it seems I am very close to being able to distribute my application :(

10 Apr 2012, 8:27 PM
Same problem. So close...so far.

5 Mar 2014, 1:32 AM
Edit : wrong subject