skip to Main Content

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

2

Answers


  1. Chosen as BEST ANSWER

    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


  2. Simply go to Run -> Edit Configurations

    Mark check on the followings:

    • Install for all users (if already installed, will only update for existing users)
    • Always install with package manager (disables deploy optimizations on Android 11 and later)
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search