https://kotlinlang.org logo
Title
k

Kuba Petržílka

12/03/2020, 3:33 PM
I've just upgraded to latest IDEA and Kotlin plugin v 1.4.20 and I m getting "Cannot access class java.io.File" or "Cannot access class java.net.URI" in the build scripts across the whole project. Has anyone experienced that?
m

Marc Knaup

12/03/2020, 3:39 PM
Check in the IDE settings that there are no old or incorrect JDK entries. Afterwards clear IDE cache & restart
k

Kuba Petržílka

12/03/2020, 3:45 PM
can you be a bit more specific please what do you mean by "old JDK entries"? we are using JDK 1.8 in our project
m

Marc Knaup

12/03/2020, 3:56 PM
File > Project Structure > Project > Project SDK > Edit
Make sure that list is cleaned up
mine
k

Kuba Petržílka

12/03/2020, 4:00 PM
I dont see any problems there or?
m

Marc Knaup

12/03/2020, 4:00 PM
Mhh looks good 😕 Then the only idea I’ve left is clearing IDE caches & restart
File > Invalidate Caches / Restart…
👍🏼 1
k

Kuba Petržílka

12/03/2020, 4:01 PM
When I switch to JDK 14 in the Gradle settings, then the problems are gone, but our project doesn't compile with JDK14 coz we depend on some old Xml bind stuff 🙄
m

Marc Knaup

12/03/2020, 4:02 PM
Maybe it’s an issue with Open JDK? 🤔
or that specific 1.8 release
or just a cache issue
k

Kuba Petržílka

12/03/2020, 4:07 PM
hm, I did clean cache and restart plus reimport of the gradle project.. it took some time but I m back where I was
it is strange that it used to work normally with 1.4.10 and IDEA 2020.2
on the same JDK
but I will try to get latest 1.8 JDK and I ll see
m

Marc Knaup

12/03/2020, 4:08 PM
Yeah that issue pops up often with IDE/Kotlin updates
I also had that with 1.4.0
causes differ though
k

Kuba Petržílka

12/03/2020, 4:18 PM
Alright, thanks a lot mate, I upgraded the OpenJDK from 252 to 273 and it works now
👍 1
h

henrik

12/17/2020, 7:01 AM
Hmm, I have the same problem with jdk15. I'll try to invalidate the cache..