Export to android - java.lang.IllegalArgumentException: Unknown package

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Adrian Pluta


I just started with Godot and I’m trying to export empty project and run on android device.

My setup:
Android 8.0.0
Ubuntu 16.04
Java 1.8.0_181
Android SDK 26

My editor was configured as described in docs adb, jarsigner and keystore. I was trying one click installation and manual installation but always the same. The installation process never ends itself.

Found in logs something like this:

jar verified.
This jar contains signatures that does not include a timestamp. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2047-04-14) or after any future revocation date.
Re-run with the -verbose and -certs options for more details.
Uninstalling previous version: Honor LLD-L31
Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown package: org.godotengine.test
	at com.android.server.pm.Settings.isOrphaned(Settings.java:4580)
	at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:23318)
	at com.android.server.pm.PackageManagerService.deletePackageVersioned(PackageManagerService.java:20042)
	at com.android.server.pm.HwPackageManagerService.deletePackageVersioned(HwPackageManagerService.java:5798)
	at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:913)
	at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:920)
	at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:136)
	at android.os.ShellCommand.exec(ShellCommand.java:96)
	at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:23624)
	at android.os.Binder.shellCommand(Binder.java:574)
	at android.os.Binder.onTransact(Binder.java:474)
	at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2652)
	at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3921)
	at com.android.server.pm.HwPackageManagerService.onTransact(HwPackageManagerService.java:943)
	at android.os.Binder.execTransact(Binder.java:675)
Installing into device (please wait..): Honor LLD-L31

Any help would be appreciated.


:bust_in_silhouette: Reply From: BoLindJensen


  • Did you find a solution your question yet?
  • Do you get the app icon on your phone?

To me the above log seems similar to a first time build / export of a project to Android.
(Godot each times cleans the phone from previous exports, but the first time around there is nothing to remove thus you get something that looks like your java exception with package unknown. )

Without deleting the app from your phone. Try rebuilding/export to your phone and see that there is no java exception this time.

To really figure out what is causing an error you need to open a adb log.
on windows:

C:\Users\[Your username here]\AppData\Local\Android\Sdk\platform-tools>

adb -d logcat godot:V DEBUG:V AndroidRuntime:V ValidateServiceOp:V *:S

Then start your app form the phone.

  • What does the adb log tell you?

I have had the same problem, I have solved this just released space on my device.
First I clear and rebuild my project and released space.
I hope have help you!

romulovll | 2019-02-14 19:54