简体   繁体   中英

I can't run the app on my device error type 3

Im making an android application and when i run it on my device i get error with launch activity

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

Error while Launching activity"

I'v tried disabling the instant run and checking the launch activity

it looks like the MainActivity.java class doesnot exist. that is what the error says. try

  1. Refactoring name of the class
  2. Rebuild the project.
  3. Invalidate cache and restart and launch the app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM