Activity class does not exist

后端 未结 18 1807
深忆病人
深忆病人 2020-12-15 16:39

Aaaargh! I don\'t know what\'s going on, but suddenly I can\'t launch my app. I\'m using IntelliJ and I keep getting this error. I thought maybe there was a typo somewhere i

相关标签:
18条回答
  • 2020-12-15 17:15

    I found an extra <application> </application> tag in my manifest, I don't know how it got there but removing it fixed my issue.

    0 讨论(0)
  • 2020-12-15 17:16

    The problem is in the build / run configuration of your project. You have to check the "Deploy application" checkbox in the Run/Debug Configuration screen, under the General tab.

    This solved my problem.

    0 讨论(0)
  • 2020-12-15 17:16

    I have tried every suggestion i found, but couldnt solve the issue. After that i figured it out myself: The problem in my case was that i renamed the package. To make sure you dont get the error above, add the

      defaultConfig {
    
        applicationId "com.yourpackage.yourapplication"
      }
    

    to your build.gradle file. Hope that helps.

    0 讨论(0)
  • 2020-12-15 17:16

    I had the same issue reported here. I recently added a third activity to my application and it was failing to launch with the same error. To fix the issue, I used a detail posted here. Another developer said that introducing an error to their AndroidManifest.xml file corrected their issue. I did the same: I added a space to cause a compile error, built, got the error reported, corrected the error and then recompiled and deployed and IT WORK.

    Hope it fixes your issue.

    0 讨论(0)
  • 2020-12-15 17:16

    One Solution:

    Just create a new project and copy your classes from the old project into the new project, run the new project and it will probably work, worked for me.

    0 讨论(0)
  • 2020-12-15 17:17

    after checking all other things that people stated in their post, check in the IDEA: Run -> Edit Configurations -> Android Application -> Launch the activity that you want to start on launch of your application should be there...

    0 讨论(0)
提交回复
热议问题