Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio incompatible types required java.lang.String found java.lang.String

After updating my Android Studio and Java, I get the above error on a simple statement like:

String s = "";

It seems like Android Studio cant find my Java.

I use Gradle (from inside Android Studio) to build my project, on a Windows 7(64bit).

I also get this error:

  @Override, not applicable to method

on my methods using: @Override

You can check out the project on Github, it works on my other computers, but not my home computer.

Can anyone please help me

like image 615
Claus Petersen Avatar asked Oct 26 '14 11:10

Claus Petersen


1 Answers

I know this is old but I got the same problem after my machine crashed while I was using Android Studio. The solution is quite simple, head to

File > Invalidate Caches & Restart

Your IDE will restart and your JAVA environment will be properly functional again.

like image 80
Moystard Avatar answered Oct 06 '22 00:10

Moystard