我只是想用虚幻引擎4设置一个测试应用程序并将其打包到我的手机上。这只是一个空的入门关卡,因为我想确保我正确设置了Android CodeWorks,并且可以打包游戏并使其在手机上运行。一切都运行顺利,直到将APK和OBB文件实际安装到我的手机上。下面是我正在获得的日志,据我所知,没有任何问题。
E:My GamesFirstGameTwinStickShooterAndroid_ATC>setlocal
E:My GamesFirstGameTwinStickShooterAndroid_ATC>if NOT "" == "" (call HostWin64AndroidSetupEnvironmentVars.bat )
E:My GamesFirstGameTwinStickShooterAndroid_ATC>set ANDROIDHOME=E:NVPACKandroid-sdk-windows
E:My GamesFirstGameTwinStickShooterAndroid_ATC>if "E:NVPACKandroid-sdk-windows" == "" set ANDROIDHOME=E:/NVPACK/android-sdk-windows
E:My GamesFirstGameTwinStickShooterAndroid_ATC>set ADB=E:NVPACKandroid-sdk-windowsplatform-toolsadb.exe
E:My GamesFirstGameTwinStickShooterAndroid_ATC>set DEVICE=
E:My GamesFirstGameTwinStickShooterAndroid_ATC>if not "" == "" set DEVICE=-s
E:My GamesFirstGameTwinStickShooterAndroid_ATC>for /F "delims=" %A in ('E:NVPACKandroid-sdk-windowsplatform-toolsadb.exe shell "echo $EXTERNAL_STORAGE"') do @set STORAGE=%A
Uninstalling existing application. Failures here can almost always be ignored.
E:My GamesFirstGameTwinStickShooterAndroid_ATC>E:NVPACKandroid-sdk-windowsplatform-toolsadb.exe uninstall com.E10Studios.TwinStickShooter
Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown package: com.E10Studios.TwinStickShooter
at com.android.server.pm.Settings.getInstallerPackageNameLPr(Settings.java:4671)
at com.android.server.pm.PackageManagerService.getInstallerPackageName(PackageManagerService.java:25411)
at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:25417)
at com.android.server.pm.PackageManagerService.deletePackageVersioned(PackageManagerService.java:21125)
at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:924)
at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:1486)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:193)
at android.os.ShellCommand.exec(ShellCommand.java:103)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:25953)
at android.os.Binder.shellCommand(Binder.java:642)
at android.os.Binder.onTransact(Binder.java:540)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:3329)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4763)
at android.os.Binder.execTransact(Binder.java:739)
Installing existing application. Failures here indicate a problem with the device (connection or storage permissions) and are fatal.
E:My GamesFirstGameTwinStickShooterAndroid_ATC>E:NVPACKandroid-sdk-windowsplatform-toolsadb.exe install TwinStickShooter-arm64-es2.apk
Failed to install TwinStickShooter-arm64-es2.apk:
There was an error installing the game or the obb file. Look above for more info.
Things to try:
Check that the device (and only the device) is listed with "ADB$ devices" from a command prompt.
Make sure all Developer options look normal on the device
Check that the device has an SD card.
我已经检查以确保我的设备显示"ADB 设备"命令,并且我很确定我的所有开发选项都可以使用,因为我只需要激活USB调试,对吗?至于SD卡,有一个,它有足够的空间,我的内部存储也是如此。
我真的很困惑,并希望任何人能提供任何帮助。感谢您抽出宝贵时间,并提前非常感谢您。另外,我对此真的很陌生,所以如果问题的解决方案如此简单,我深表歉意。
我只是弄乱了手机上的设置并解决了这个问题。对于可能遇到相同问题的其他任何人,将手机连接到PC并打开USB调试,向下拖动以调出菜单,单击android系统通知,然后将USB传输设置从文件传输更改为图像传输。它立即对我有用。