Milad Na
Milad Na

Reputation: 53

can't find android.Activity class intellij IDEA

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

Upvotes: 2

Views: 2105

Answers (4)

user4537857
user4537857

Reputation:

Download and reinstall. Simplest fix.

Upvotes: 2

user4537849
user4537849

Reputation:

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.

Upvotes: 3

cn123h
cn123h

Reputation: 2332

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

Upvotes: 10

Sipty
Sipty

Reputation: 1154

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.

Upvotes: 2

Related Questions