Android Studio showing error in valid Java Code

I reformatted my mac recently and installed everything from scratch.

So I did it with Android Studio too and then I imported an existing project of mine.

As you can see in the screenshot, when I use Long.parseLong(), Android Studio is telling me that it is not a valid function but it is a valid function in java.

How do I fix this?

Previous Attempts to fix.

1. Reinstall JDK and JRE

2. Reinstall Android Studio

3. Clean and Rebuild gradle

4. Android Studio -> File -> Invalidate Caches/Restart

None of these steps worked.

What is wrong with my Android...

Read More »

By: StackOverFlow - 7 days ago

Related Posts