Search code examples
androidinstallationadbdevice

Cant reinstall my Android app on my device anymore, after deinstalling the App. (Error type 3: MainActivity does not exist)


I need a little bit of help with my new problem. I'm programming an android app with Android studio and everything worked fine. I always tested my app on my device (Xiaomi Mi 8).

I tried to reinstall my application, after this I always got the error

Error while executing: am start -n "com.example.cartalk/com.example.cartalk.Activities.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.cartalk/.Activities.MainActivity } Error type 3 Error: Activity class {com.example.cartalk/com.example.cartalk.Activities.MainActivity} does not exist.

Error while Launching activity

The issue can be reconstructed. I would say that there are some data left, which wasn't deleted with the uninstallation.

But I don't know how to delete them.

I tried:

adb deinstall "package name" (can't find the package anymore)

I also used CCleaner (didn't work)


Solution

  • Okay, I finally solved my issue.

    What I did:

    I build an apk.

    Used the comment

    adb install -r -t app-debug.apk
    

    app-debug.apk can be found under ProjectFolder\app\build\outputs\apk\debug

    After the success, i tried the adb uninstall again.

    adb uninstall "package name"
    

    Now, the package could be found and deinstalled completely!