principal-ideal-domain
principal-ideal-domain

Reputation: 4266

How do I reinstall App using Android Studio

I'm trying to develop an Android app using Android Studio. To be sure to get the current version of the App on my phone I uninstalled the App on the phone and wanted Android Studio to push the new version on my phone to test it. But when I hit "Run" I get this error:

12/22 13:22:31: Launching app
$ adb install-multiple -r -t C:\PATH\app\build\intermediates\split-apk\debug\slices\slice_3.apk C:\PATH\app\build\intermediates\split-apk\debug\slices\slice_9.apk C:\PATH\app\build\intermediates\split-apk\debug\slices\slice_2.apk C:\PATH\app\build\intermediates\split-apk\debug\slices\slice_6.apk C:\PATH\app\build\intermediates\split-apk\debug\slices\slice_0.apk C:\PATH\app\build\intermediates\resources\instant-run\debug\resources-debug.apk C:\PATH\app\build\intermediates\split-apk\debug\slices\slice_1.apk C:\PATH\app\build\intermediates\split-apk\debug\dep\dependencies.apk C:\PATH\app\build\intermediates\split-apk\debug\slices\slice_4.apk C:\PATH\app\build\intermediates\split-apk\debug\slices\slice_5.apk C:\PATH\app\build\intermediates\split-apk\debug\slices\slice_8.apk C:\PATH\app\build\intermediates\split-apk\debug\slices\slice_7.apk C:\PATH\app\build\intermediates\instant-run-apk\debug\app-debug.apk 
Split APKs installed in 6 s 939 ms
$ adb shell am start -n "com.example.apps.appname/com.example.apps.appname.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Error while executing: am start -n "com.example.apps.appname/com.example.apps.appname.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.apps.appname/.MainActivity }
Error type 3
Error: Activity class {com.example.apps.appname/com.example.apps.appname.MainActivity} does not exist.

Error while Launching activity

Upvotes: 2

Views: 10913

Answers (4)

Junior_Moraba
Junior_Moraba

Reputation: 31

Try checking if the package is available by running the following command:

adb shell pm path list packages

If the package is available, uninstall it using:

adb uninstall <packageName>

Then, run the application from Android Studio, and it should be working.

Upvotes: 1

Francois Ikswobyzrg
Francois Ikswobyzrg

Reputation: 31

As @principal-ideal-domain said, go into Settings > Applications and check the app was still installed but not for the current user, simply click on the three dots in the top-right corner and click on "Uninstall for all users"

Upvotes: 1

principal-ideal-domain
principal-ideal-domain

Reputation: 4266

Short version: I solved the problem by deleting the app for all users.

Long version: First I did all the things recommended here and in similar threads but nothing helped. What I did then was revisiting the list of all installed apps on my phone. There I saw that the app somehow still was there (even though I deleted it). I had the option there to delete it for all users. After doing so I could reinstall it as usual by pressing Run in Android Studio and everything worked fine.

Upvotes: 3

Mayur Prajapati
Mayur Prajapati

Reputation: 627

Try to Disable Instant Run

To disable Instant Run: Open the Settings or Preferences dialog.

Navigate to Build, Execution, Deployment > Instant Run.

Uncheck the box next to Enable Instant Run.

Upvotes: 0

Related Questions