I decided to generate even more money and develop my first app for Android. When I want to deploy my app (just the skeleton code from IntelliJ/Android SDK) with one MainActivity
I am getting the following error.
The log of the run looks like this.
5/07 21:32:35: Launching app
$ adb install-multiple -r -t
C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_7.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_6.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_8.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_9.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_4.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_5.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_3.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\resources\instant-run\debug\resources-debug.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_0.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_1.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\dep\dependencies.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\split-apk\debug\slices\slice_2.apk C:\Users\Tony\Code\Java\PureWallpaper\app\build\intermediates\instant-run-apk\debug\app-debug.apk
$ adb shell pm uninstall com.stark.purewallpaper
Unknown failure: Exception occurred while executing: java.lang.IllegalArgumentException: Unknown package: com.stark.purewallpaper at com.android.server.pm.Settings.getInstallerPackageNameLPr(Settings.java:4671) at com.android.server.pm.PackageManagerService.getInstallerPackageName(PackageManagerService.java:25342) at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:25348) at com.android.server.pm.PackageManagerService.deletePackageVersioned(PackageManagerService.java:21062) 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:25884) 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) Error while Installing APKs
The event log looks like this.
21:32 Executing tasks: [:app:assembleDebug] 21:32 Gradle build finished in 493 ms 21:32 Failed to finalize session : -118
Things I tried on the phone:
Things I tried in IntelliJ:
IntelliJ can clearly see my device, it even detects the type correctly.
I am on:
I decided to try this on Android Studio 3.4 and I'm getting same error.
I am able to run the app inside the emulator/virtual device but not on my Samsung Galaxy S10+. Any ideas?
If none of the solution mentioned above works, you can turn off the instant run option as shown in the from setting
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With