Godot releases unsigned Android version problem

question

Using the program developed by Godot, the exported Android version reported an error when installed on the phone (the system is based on Android 11), prompting:

App not installed: The package appears to be invalid.
Application installation exception (-103)

Investigation process and resolution

  • Checking the package body, it was found that a dynamic library file named ddsnative.so for the GDNative C++ implementation was missing; I accidentally found an error message in the "Output" window when exporting the Android version, to the effect that the Android .so dynamic library file must start with "lib" , so it is confirmed that there is a problem with the exported package body.
  • Modify the name of the dynamic library file output by GDNative C++ to libddsnative.so, re-release it, and the files in the package are complete. Continue the installation to no avail.
  • Some of the information collected online pointed to signature errors. Compared with some screenshots online, I found that the settings of the new version of the editor I used were like this: the Insert image description here
    JDK path setting was missing, and the package signing tool was based on Java.
    The jre directory where the JVM embedded in the old version of Android SDK is located is no longer valid in the new version, and the new version uses jbr instead. The Godot editor code may not have been adapted to this change. Could it be that the signing tool was not found but no error was reported?
  • Manually sign the .apk with jarsigner.exe. Reinstallation doesn't work!
  • Consider that the .apk package signature has improvements such as V1 and V2, and then manually sign with apksigner.bat. Reinstall, successful!

Guess you like

Origin blog.csdn.net/feiyunw/article/details/127541138