[SOLVED] Java String class cannot access after IntelliJ update

Answered

Hello,

after the automatic IntelliJ update to version 2021.1, in my java project shows errors. But this errors aren't real. I can compile an run the project without any errors.
Every String variable are marked with a red underline and the Error say:
Required type: java.lang.String
Provided type: java.lang.String

I choosed the SDK correctly and doesn't changed it.

Any one knows how this error occurs and how I can solve it?

Here are some screenshots

2
10 comments

Hello,

Please try to run "File | Invalidate Caches".

15

Thx, it worked!

0

Faced the Same Problem. Thanks a ton Yaroslav Bedrov

0

Thanks man, you are Superman)

0

Thanks, Its work 😲🤗👊

0

I'm having a similar issue. However, the proposed solution did NOT work for me. I've tried restarting, reinstalling, running in admin mode. I simply do not know what the hell is wrong with my project. It's frankly infuriating

0

I'm seeing the same issue after todays update. Clearing the cache doesn't help either

0

Do you have an import for String from jdk, or do you define your own packages “java.lang” and new String class?

1

Thank you. It worked.

0

Please sign in to leave a comment.