I have an old app that I originally wrote in Java using Eclipse. I have since recreated the app in Objective-C using Xcode. The iOS app is more stable and so I am trying to transfer it to Android using Apportable. I have successfully created the release APK if I create a new keystore, but if I try to use the old keystore I get the error message below. I have verified that I am using the correct password. Can anyone tell me what the problem is?
BUILD=release ANDROID_KEYSTORE=/Users/user.name/Dropbox/Apportable/Game\ Game/Game.keystore ANDROID_KEYSTORE_PASS=password apportable build
....
[339/339] Building Build/android-armeabi-release/FarmingGame/FarmingGame-release.apk
FAILED: java -jar /Users/user.name/.apportable/SDK/toolchain/macosx/zipbuilder/zipbuilder.jar --zipalign 4 --keystore '/Users/user.name/Dropbox/Apportable/Farming Game/ConstructionKey.keystore' --storepass "$ANDROID_STOREPASS" --keyalias mykey --keypass "$ANDROID_KEYPASS" --cafe-marker -- /Users/user.name/.apportable/SDK/Build/android-armeabi-release/FarmingGame/FarmingGame-release.apk /Users/user.name/.apportable/SDK/Build/android-armeabi-release/FarmingGame/FarmingGame-release.apk.input_list
Exception in thread "main" java.lang.NullPointerException
at com.apportable.zipbuilder.JarSigner.generateSignatureBlock(JarSigner.java:138)
at com.apportable.zipbuilder.JarSigner.signOutputJar(JarSigner.java:55)
at com.apportable.zipbuilder.Main.main(Main.java:153)
ninja: build stopped: subcommand failed.
Error: command failed: /Users/user.name/.apportable/SDK/toolchain/macosx/ninja/ninja --no-strip-ansi-escapes -j 16 /Users/user.name/.apportable/SDK/Build/android-armeabi-release/FarmingGame/FarmingGame-release.apk
It doesn't look like you are specifying the ANDROID_KEY_NAME=...
environment variable in that build command.
The ANDROID_KEY_NAME
should be set to the alias of the key you want to use. To see which keys (and their alias values) are available run the following command from your Terminal app:
keytool -list -v -keystore /path/to/your/keystore.keystore