Reda TaJ
Reda TaJ

Reputation: 43

Not able to debug my app on android device

I'm not able to debug my app on my android device after I changed the package name (it was working before). I keep seeing the message below in Debug tab when I click the "Run" button.

This is the error message:

Error while executing: am start -n "com.anhnt/com.focuslab.flashlightnotif.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.anhnt/com.focuslab.flashlightnotif.activities.MainActivity }
Error type 3
Error: Activity class {com.anhnt/com.focuslab.flashlightnotif.activities.MainActivity} does not exist.
Error while Launching activity

Upvotes: 3

Views: 48

Answers (2)

Cedric Martens
Cedric Martens

Reputation: 1199

Make sure that in the Manifest you have updated the information. The manifest file is currently searching to launch MainActivity in com.anhnt/com.focuslab.flashlightnotif.activities and I believe you have refactored the path to reach it.

Upvotes: 2

Patricia
Patricia

Reputation: 2865

Change the package name also in the Manifest File and in the Gradle File

Upvotes: 1

Related Questions