• Building
  • Can't Export to Android: Godot 3.3 can't find apksigner

The recommended upgrade from Godot 3.2.3 to Godot 3.3 introduced a problem in my existing project: I can no longer export my game to Android. Attempting to do it anyways displayed 6 errors in red. Most of them were solved by installing the Android Export Template for Godot 3.3, but One remained:

┌─────────────────────────────────────────────────────────────────────────┐    
│                               Load Errors                             X │
├─────────────────────────────────────────────────────────────────────────┤    
│ ?Unable to find Android SDK build-tools' apksigner command.            │ 
│ Please check in the Android SDK directory specified in Editor settings. │ 
│                                                                         │
│                                                                         │
│                                                                         │
│                                                                         │
│                                                                         │
│                                                                         │
│                                                                         │
├─────────────────────────────────────────────────────────────────────────┤
│                                 > OK <                                  │
└─────────────────────────────────────────────────────────────────────────┘ 

When I close the window, I find this one:

┌──────────────────────────────────────┐
│               Warning!             X │
├──────────────────────────────────────┤
│ Unable to find the 'apksigner' tool. │ 
├──────────────────────────────────────┤
│        > OK <   > Copy Text <        │
└──────────────────────────────────────┘

I didn't have this problem before, as Godot 3.2.3 used the Jarsiger, in a separately specified filepath, to sign my APK files.

I have specified /lib/android-sdk as my Android SDK path. This is the file structure from that point, on a fresh reinstall of android-sdk (I boldened the word apksigner. If you still can't find it, try to press [Ctrl]+[F] and type apksigner): - /lib/android-sdk - - build-tools - - - [2 directories with identical file structure:] 27.0.1 [soft link]; debian - - - - aapt - - - - aapt2 - - - - aidl - - - - aidl-cpp - - - - apksigner.jar - - - - dexdump - - - - dx - - - - lib - - - - - dx.jar [soft link] - - - - - shrinkedAndroid.jar [soft link] - - - - llvm-rs-cc - - - - mainDexClassesNoAapt.rules - - - - mainDexClasses.rules - - - - package.xml - - - - runtime.properties - - - - source.properties - - - - split-select - - - - zipalign - - licenses - - - apache-2.0 - - platforms - - - android-23 - - - - android.jar [soft link] - - - - framework.aidl - - platform-tools - - - adb - - - dmtracedump - - - etc1tool - - - fastboot - - - hprof-conf - - - make_f2fs [soft link] - - - mke2fs [soft link] - - - package.sml - - - sload_f2fs [soft link] - - - source-properties - - - sqlite3 [soft link] - - tools - - - bin - - - - e2fschl [soft link] - - - - fsck.ext4 [soft link] - - - - mkfs.ext4 [soft link] - - - - resize2fs [soft link] - - - - tune2fs [soft link] - - - package.xml - - - proguard - - - - bin - - - - - proguard [soft link] - - - - - proguardgui [broken link] - - - - lib - - - - - proguardgui.jar [broken link] - - - - - proguard.jar [soft link] - - - - - retrace.jar - - - - proguard-android-optimize.txt - - - - proguard-android.txt - - - - proguard-project.txt - - - source.properties

@cybereality I have reinstalled Android SDK with the instructions you linked me:

  1. Install the command line tools
  2. Navigate to the command line tools directory in terminal
  3. Use the sdkmanager command from below the command line tools download link 3.1 Paste the full command into the terminal 3.2 Replace the android_sdk_path placeholder with /lib/android-sdk 3.3 Run the command
  4. Specify the new Android SDK Path in Godot Editor Settings.

This has not helped much. The Android SDK directory's file structure is now much simpler, but I still get the same error from this thread's starting post.

This is the updated File Structure: - /lib/android-sdk - - build-tools - - - debian - - - - apksigner.jar - - platform-tools - - - adb - - - package.xml - - - source.properties

I remember that when I upgraded from 3.23, I had to explicitly fill in the Keystore fields in the Project >> Export dialog. In 3.2.3, that was not necessary; having them in Editor Settings >> Export was adequate.

@Sosasees said: @cybereality I have reinstalled Android SDK with the instructions you linked me:

  1. Install the command line tools
  2. Navigate to the command line tools directory in terminal
  3. Use the sdkmanager command from below the command line tools download link 3.1 Paste the full command into the terminal 3.2 Replace the android_sdk_path placeholder with /lib/android-sdk 3.3 Run the command
  4. Specify the new Android SDK Path in Godot Editor Settings.

---

This has not helped much. The Android SDK directory's file structure is now much simpler, but I still get the same error from this thread's starting post.

This is the updated File Structure: - /lib/android-sdk - - build-tools - - - debian - - - - apksigner.jar - - platform-tools - - - adb - - - package.xml - - - source.properties

No, this Was the solution. I didn't see it immidiately because the rest of the solution (at least the solution for Linux) was Really stupidly cryptic.

Godot didn't accept the Apksigner because its filename was 'apksigner.jar' instead of just 'apksigner'. When I did the following steps, it was solved (The exact steps are for Linux): 1. Open Terminal 2. Navigate to the Android SDK Build Tools directory (Mine was /lib/android-sdk/build-tools/debian): cd /lib/android-sdk/buid-tools/debian 3. Create a symbolic link of the apksigner.jar file, with the name apksigner: sudo ln -s apksigner.jar apksigner (You could also rename apksigner.jar to apksigner by tying mv (move) instaed of ln -s, but I chose the Symbolic Link route to minimize the chances of other programs suddenly reporting an error because apksigner.jar has been gone)

After that, I also can't have the Debug Keystore specified under Both the Editor settings And the Project Export settings, but under the Editor settings only, to prevent an "Apksigner has thrown error #2" message from blocking my Android export.

That's strange. I'm on Linux and the apksigner is there with a different folder structure. ./Android/Sdk/build-tools/30.0.3/apksigner I think because I installed Android Studio, maybe you used a different install method.

./Android/Sdk/build-tools/30.0.3/apksigner

I have Android Studio installed, and my apksigner path(s) looks like that.

It's also included with my Unity installation. The path has a similar structure, but a few levels deeper: ~/Unity/2020.1.8f1/Editor/Data/PlaybackEngines/AndroidPlayer/SDK/build-tools/29.0.2/apksigner