Running into problems when trying to bundle mobile game

#1

Hi, I’m trying to bundle a sample project as android game but it gets stuck in indeterminate “Bundling” process.


The terminal output is:


2021-02-12 12:31:18.224 INFO default com.dynamo.bob.bundle.AndroidBundler - Compiling resources from /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/res 
2021-02-12 12:31:18.227 INFO default com.dynamo.bob.bundle.AndroidBundler - exec: /tmp/6884614554578623832/x86_64-linux/aapt2 compile -o /tmp/compiled_resources7611006664251297421/com.example.todo --dir /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/res/com.example.todo 
2021-02-12 12:31:18.277 INFO default com.dynamo.bob.bundle.AndroidBundler - exec: /tmp/6884614554578623832/x86_64-linux/aapt2 compile -o /tmp/compiled_resources7611006664251297421/com.defold.android --dir /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/res/com.defold.android 
2021-02-12 12:31:18.653 INFO default com.dynamo.bob.bundle.AndroidBundler - Linking resources from /tmp/compiled_resources7611006664251297421 
2021-02-12 12:31:18.670 INFO default com.dynamo.bob.bundle.AndroidBundler - exec: /tmp/6884614554578623832/x86_64-linux/aapt2 link --proto-format -o /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/aab/aapt2/apk/output.apk -I /tmp/6884614554578623832/lib/android.jar --manifest /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/AndroidManifest.xml --auto-add-overlay -R @/home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/aab/compiled_resources.txt 
2021-02-12 12:31:19.670 INFO default com.dynamo.bob.bundle.AndroidBundler - Creating AAB base.zip 
2021-02-12 12:31:19.681 INFO default com.dynamo.bob.bundle.AndroidBundler - Copying dex to /tmp/6884614554578623832/lib/classes.dex 
2021-02-12 12:31:19.706 INFO default com.dynamo.bob.bundle.AndroidBundler - Copying asset to /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/aab/base/assets/game.projectc 
2021-02-12 12:31:19.707 INFO default com.dynamo.bob.bundle.AndroidBundler - Copying asset to /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/aab/base/assets/game.arci 
2021-02-12 12:31:19.720 INFO default com.dynamo.bob.bundle.AndroidBundler - Copying asset to /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/aab/base/assets/game.arcd 
2021-02-12 12:31:19.744 INFO default com.dynamo.bob.bundle.AndroidBundler - Copying asset to /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/aab/base/assets/game.dmanifest 
2021-02-12 12:31:19.746 INFO default com.dynamo.bob.bundle.AndroidBundler - Copying asset to /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/aab/base/assets/game.public.der 
2021-02-12 12:31:19.749 INFO default com.dynamo.bob.bundle.AndroidBundler - Copying resources to /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/aab/base/res 
2021-02-12 12:31:19.781 INFO default com.dynamo.bob.bundle.AndroidBundler - Copying engine to /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/aab/base/lib/armeabi-v7a/libSidescrollertutorial.so 
2021-02-12 12:31:20.064 INFO default com.dynamo.bob.bundle.AndroidBundler - exec: /tmp/6884614554578623832/x86_64-linux/strip_android /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/aab/base/lib/armeabi-v7a/libSidescrollertutorial.so 
2021-02-12 12:31:20.166 INFO default com.dynamo.bob.bundle.AndroidBundler - Copying engine to /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/aab/base/lib/arm64-v8a/libSidescrollertutorial.so 
2021-02-12 12:31:20.494 INFO default com.dynamo.bob.bundle.AndroidBundler - exec: /tmp/6884614554578623832/x86_64-linux/strip_android_aarch64 /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/aab/base/lib/arm64-v8a/libSidescrollertutorial.so 
2021-02-12 12:31:20.595 INFO default com.dynamo.bob.bundle.AndroidBundler - Zipping /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/aab/base to /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/aab/base.zip 
2021-02-12 12:31:23.123 INFO default com.dynamo.bob.bundle.AndroidBundler - Creating Android Application Bundle 
2021-02-12 12:31:23.137 INFO default com.dynamo.bob.bundle.AndroidBundler - exec: /home/BurstXD/Defold/packages/jdk11.0.1-p1/bin/java -jar /tmp/6884614554578623832/bundletool-all.jar build-bundle --modules /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/aab/base.zip --output /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/Side scroller tutorial.aab 
2021-02-12 12:31:34.310 INFO default com.dynamo.bob.bundle.AndroidBundler - Sign /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/Side scroller tutorial.aab 
2021-02-12 12:31:34.312 INFO default com.dynamo.bob.bundle.AndroidBundler - exec: /home/BurstXD/Defold/packages/jdk11.0.1-p1/bin/jarsigner -verbose -keystore /home/BurstXD/CU Mobile.jks -storepass ***REDACTED*** /home/BurstXD/GameProjects/armv7-android/Side scroller tutorial/Side scroller tutorial.aab gulp

I don’t know what to do… Is Defold having some problems to find SDK?

0 Likes

#2

It seems to wait indefinitely for the jarsigner command to finish. This step:

Looking specifically at the commandline that gets invoked I believe there’s a problem with the -keystore path containing a space and the argument not being passed inside quotes:

-keystore /home/BurstXD/CU Mobile.jks

Could you try renaming the keystore file?

0 Likes

#3

Ohhh… Thanks! I’ll!

0 Likes

#4

Renamed CU Mobile to CU_Mobile and CUMobile, it’s not working. It got stuck again…

0 Likes

#5

Ok, another thing I noticed before removing the keystore password from the log you shared above (be careful about sharing logs containing passwords) was that it contained non alphanumeric characters and it wasn’t in quotes either (something I will make sure to fix). Can you try creating a new keystore and use a basic password containing only alphanumeric characters?

Another thing you could try is to run the jarsigner command from a terminal just to check that it can run at all. Try running:

/home/BurstXD/Defold/packages/jdk11.0.1-p1/bin/jarsigner

And see if it gives you any usage output.

2 Likes

#6

Thanks, it works now! :grinning:

0 Likes

#7

Ok, great! Was it the password?

0 Likes

#8

Yes.

0 Likes

#9

Thanks. Created issue: https://github.com/defold/defold/issues/5563

0 Likes

#10

I’m unable to reproduce your problem in my own tests. Which OS are you using?

I was wrong here. We use the Java ProcessBuilder class to call the “jarsigner” command and it takes care this.

1 Like

#11

Sorry, for not replying soon… I’m using Ubuntu 20.10.

0 Likes

#12

Thanks. And did I remember correctly that the password contained a non alphanumeric character?

1 Like

#13

It’s true. ‘@’, was the troublesome non alphanumeric character.

2 Likes