Announcement

Collapse
No announcement yet.

Unknown Package - Installation of APK failed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unknown Package - Installation of APK failed

    Hello,

    I'm new to Android development in Unreal Engine 4, and I'm running into this issue when trying to Launch the HandheldARBlankMap level to my Android device.
    I'm developing in UE4 4.25.1, with a Verizon Samsung Galaxy Note 8 phone, running on Android 9.0 Pie.

    I've followed the instructions in the following guides to get started:
    https://docs.unrealengine.com/en-US/...dio/index.html
    https://docs.unrealengine.com/en-US/...ent/index.html

    I've also ran the SetupAndroid.bat file, which did produce the error about repositories.cfg being unable to be loaded. I resolved that by creating a null file in the location it expects it to be in. When running SetupAndroid.bat again, the error is gone, I'm able to accept the license agreement, but I'm met with the following error:
    Android Studio Path: "C:\Program Files\Android\Android Studio"
    Android Studio SDK Path: C:\Users\evanh\AppData\Local\Android\Sdk
    Current user path: "%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon"
    ERROR: Invalid syntax. Default option is not allowed more than '2' time(s).
    Type "SETX /?" for usage.
    Added C:\Users\evanh\AppData\Local\Android\Sdk\platform-tools;C:\Users\evanh\AppData\Local\Android\Sdk\tools to path
    Using sdkmanager: C:\Users\evanh\AppData\Local\Android\Sdk\tools\bin\sdkmanager.bat
    [=======================================] 100% Computing updates...
    Success!

    SUCCESS: Specified value was saved.

    SUCCESS: Specified value was saved.
    Press any key to continue . . .

    When I try to Launch the level on my Android device, I get the following Log messages:
    LogPlayLevel: Running: C:\Users\evanh\AppData\Local\Android\Sdk\platform-tools\adb.exe -s ce0617169c6db09c0d7e uninstall com.evanhammel.ArScoutApp
    LogPlayLevel: Exception occurred while executing:
    LogPlayLevel: java.lang.IllegalArgumentException: Unknown package: com.evanhammel.ArScoutApp
    LogPlayLevel: at com.android.server.pm.Settings.getInstallerPackageNameLPr(Settings.java:4671)
    LogPlayLevel: at com.android.server.pm.PackageManagerService.getInstallerPackageName(PackageManagerService.java:25462)
    LogPlayLevel: at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:25468)
    LogPlayLevel: at com.android.server.pm.PackageManagerService.deletePackageVersioned(PackageManagerService.java:21173)
    LogPlayLevel: at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:925)
    LogPlayLevel: at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:1486)
    LogPlayLevel: at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:193)
    LogPlayLevel: at android.os.ShellCommand.exec(ShellCommand.java:103)
    LogPlayLevel: at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:26004)
    LogPlayLevel: at android.os.Binder.shellCommand(Binder.java:642)
    LogPlayLevel: at android.os.Binder.onTransact(Binder.java:540)
    LogPlayLevel: at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:3329)
    LogPlayLevel: at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4768)
    LogPlayLevel: at android.os.Binder.execTransact(Binder.java:739)
    LogPlayLevel: Took 0.1161055s to run adb.exe, ExitCode=255
    LogPlayLevel: Running: C:\Users\evanh\AppData\Local\Android\Sdk\platform-tools\adb.exe -s ce0617169c6db09c0d7e install "G:\UE4\Projects\AR_Scout_Tryagain\Binaries/Android\AR_Scout_Tryagain-armv7.apk"
    LogPlayLevel: Performing Streamed Install
    LogPlayLevel: adb: failed to install G:\UE4\Projects\AR_Scout_Tryagain\Binaries/Android\AR_Scout_Tryagain-armv7.apk:
    LogPlayLevel: Took 0.2712465s to run adb.exe, ExitCode=1
    LogPlayLevel: Error: ERROR: Installation of apk 'G:\UE4\Projects\AR_Scout_Tryagain\Binaries/Android\AR_Scout_Tryagain-armv7.apk' failed
    LogPlayLevel: (see C:\Users\evanh\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.25\Log.txt for full exception trace)
    LogPlayLevel: AutomationTool exiting with ExitCode=35 (Error_AppInstallFailed)
    LogPlayLevel: Completed Launch On Stage: Deploy Task, Time: 12.014608
    LogPlayLevel: BUILD FAILED
    PackagingResults: Error: Launch failed! Failed to Install app

    As far as I can tell, I'm able to package the level into an apk, but upon Launching to the device, it's failing due to the apk being from an unknown source. The option to allow installing apk files from unknown sources changed from Android 8 to 9, limiting you to only allowing individual apps to install apk files. Is there a way to allow Unreal Engine to install to the device?

    Has anyone solved this issue of being able to Launch on an Android device running Android 9 or newer? Is there something I am totally missing in this process?

    Greatly appreciate any help, or being pointed in the right direction.
Working...
X