安装由于以下原因而失败:“ cmd软件包install-create -r -t --full -S 485440429”返回错误“未知失败:执行时发生异常

时间:2019-09-22 20:54:46

标签: android

在将Android App推入仿真器时出现此错误:

09/22 23:52:08: Launching 'app' on Pixel 3a API 29.
Installation did not succeed.
The application could not be installed.
Installation failed due to: ''cmd package install-create -r -t --full -S 485440429' returns error 'Unknown failure: Exception occurred while executing:
android.os.ParcelableException: java.io.IOException: Requested internal only, but not enough space
at android.util.ExceptionUtils.wrap(ExceptionUtils.java:34)
at com.android.server.pm.PackageInstallerService.createSession(PackageInstallerService.java:467)
at com.android.server.pm.PackageManagerShellCommand.doCreateSession(PackageManagerShellCommand.java:2700)
at com.android.server.pm.PackageManagerShellCommand.runInstallCreate(PackageManagerShellCommand.java:1106)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:176)
at android.os.ShellCommand.exec(ShellCommand.java:104)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21742)
at android.os.Binder.shellCommand(Binder.java:881)
at android.os.Binder.onTransact(Binder.java:765)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4860)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4016)
at android.os.Binder.execTransactInternal(Binder.java:1021)
at android.os.Binder.execTransact(Binder.java:994)
Caused by: java.io.IOException: Requested internal only, but not enough space
at com.android.internal.content.PackageHelper.resolveInstallVolume(PackageHelper.java:234)
at com.android.internal.content.PackageHelper.resolveInstallVolume(PackageHelper.java:150)
at com.android.internal.content.PackageHelper.resolveInstallVolume(PackageHelper.java:165)
at com.android.server.pm.PackageInstallerService.createSessionInternal(PackageInstallerService.java:571)
at com.android.server.pm.PackageInstallerService.createSession(PackageInstallerService.java:465)
... 11 more''

1 个答案:

答案 0 :(得分:0)

java.io.IOException: Requested internal only, but not enough space

增加设备在模拟器上的存储空间即可解决。

或更改:

android:installLocation="preferExternal"