2

Yesterday my laptop got turned off, because I forget to plug it to the power source.

Now I turn on my laptop and see an error in the bottom of the Run windows, when I attempt to run my project:

Error:Cannot find android.app.Activity class

And I tested this and this way can't solve my problem Android Hello World in IntelliJ 12 - Cannot find android.app.Activity class

Edit: i use this answer, and it's work for me:

https://stackoverflow.com/a/28369514/2003342

Community
  • 1
  • 1
Milad Na
  • 53
  • 1
  • 10

4 Answers4

10

maybe invalidate IDEA cache could help? Files -> Invalidate cache and restart -> Invalidate and restart

cn123h
  • 2,302
  • 1
  • 21
  • 16
3

Faced similar problem. Tried restarting, it didn't work. But the problem occurred when I changed the installation path for SDKs. So reinstalled with default path, everything worked fine. Hope it helps.

2

Haven't used IntelliJ in a while, I have had this problem before and it's usually a case of a missing reference somewhere.

Try removing the old Android SDK from the program and adding it back. If that doesn't work, try reinstalling everything, with a fresh SDK from the Google site. That should fix it for you.

Sipty
  • 1,159
  • 1
  • 10
  • 18
2

Download and reinstall. Simplest fix.