Home > Net >  Installation did not succeed. The application could not be installed due to:
Installation did not succeed. The application could not be installed due to:

Time:04-19

While trying to launch my app in Android Studio I am getting this error. I already tried to clean the project and build it again. I also did a cold boot of the emulators. Thank you for your help!!!

Installation did not succeed.
The application could not be installed.

List of apks:
[0] '/Users/--/AndroidStudioProjects/acude/app/build/intermediates/apk/debug/app-debug.apk'
Installation failed due to: ''cmd package install-create -r -t --user current --full --dont-kill -Xlint:deprecation -S 3696631' returns error 'Unknown failure: Exception occurred while executing 'install-create':
java.lang.IllegalArgumentException: Unknown option -X
at com.android.server.pm.PackageManagerShellCommand.makeInstallParams(PackageManagerShellCommand.java:2883)
at com.android.server.pm.PackageManagerShellCommand.runInstallCreate(PackageManagerShellCommand.java:1412)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:195)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21623)
at android.os.Binder.shellCommand(Binder.java:929)
at android.os.Binder.onTransact(Binder.java:813)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4603)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4302)
at android.os.Binder.execTransactInternal(Binder.java:1159)
at android.os.Binder.execTransact(Binder.java:1123)''
Retry
Failed to launch an application on all devices

CodePudding user response:

After a big investigation I found the error. The command -Xlint cannot be launch from java.

To change the install command you must go to run > edit configurations and delete the comments in Install Flags

  • Related