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

After updating my Android Studio and Java, I get the above error in a simple instruction, for example:

String s = ""; 

It seems Android Studio cannot find my Java.

I am using Gradle (from within Android Studio) to create my project on Windows 7(64bit) .

I also get this error:

  @Override, not applicable to method 

in my methods using: @Override

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

Can anybody help me

+6
source share
1 answer

I know this is old, but I have the same problem after my car crashed when I used Android Studio. The solution is pretty simple, head to

 File > Invalidate Caches & Restart 

Your IDE will reboot and your JAVA will function correctly again.

+12
source

Source: https://habr.com/ru/post/977234/


All Articles