Getting "Kotlin: Unresolved reference: scene2d" error #310
-
Any ideas what could be causing this? |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments
-
9/10 problems like this are caused by Gradle setup - a |
Beta Was this translation helpful? Give feedback.
-
It was this issue again: https://youtrack.jetbrains.com/issue/KT-32047 IDEA didn't show any problems, but when trying to run the project, there were I've deleted all the Managing dependencies and upgrading when there are breaking changes is definitely my absolute least favorite thing in software development. |
Beta Was this translation helpful? Give feedback.
-
Sorry to hear that. However, it seems that it's not as much of a breaking changes problem as a problem with your local setup. Deleting Gradle and IDE related folders is what I would have done too, or just building from a clean copy of the repository. |
Beta Was this translation helpful? Give feedback.
-
@czyzby Now I have reset everything to the previous state, deleted |
Beta Was this translation helpful? Give feedback.
-
Which Gradle version are you on? If you have set up your project a while back with the official tool, you might be on a very old version that isn't fully supported by IDEA. To be honest, that dependency should be enough. Are you sure it's in the core project? I can give it a try locally if you can post a reproducible example, but usually a rebuild is all I need when I encounter issues like that. Have you tried cleaning IDEA cache? |
Beta Was this translation helpful? Give feedback.
-
I honestly think this is an IntelliJ / Kotlin problem, so definitely not your fault. Look at this beauty: from I don't even know where that jdk7 comes from. I've always used JDK 8. Coroutines? I'm not using them. There's zero mention of coroutines in the whole codebase. Oh.. and now IntelliJ IDEA froze. (IDEA = latest version)
Thanks, yes, but I'll try again.
I'm on gradle 5.4.1 |
Beta Was this translation helpful? Give feedback.
-
Depending on the module, KTX could define coroutines as a provided dependency (that you have to define manually), but they're marked with |
Beta Was this translation helpful? Give feedback.
-
Do a clean install in a virtual machine. Make sure it's not a problem with your config. :) |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestions! I've deleted the I also tried the new plugin syntax here for Kotlin, but it seems everything broke in the LibGDX project when I did that. (Could be unrelated though.) I'll try to update KTX again tomorrow! |
Beta Was this translation helpful? Give feedback.
-
Glad you worked it out! There might have been some breaking changes, depending on the module and how old KTX you're currently at, but you should find everything you need in the changelog. The modules with any major changes (like |
Beta Was this translation helpful? Give feedback.
-
Thanks for the support! The update went through without a hitch. No idea what happened there yesterday. The upside is that all the IntelliJ IDEA stuff is now in the |
Beta Was this translation helpful? Give feedback.
Thanks for the suggestions!
I've deleted the
.idea
folder and re-imported in IDEA from the.gradle
file and now it's running again. Yay!I also tried the new plugin syntax here for Kotlin, but it seems everything broke in the LibGDX project when I did that. (Could be unrelated though.)
I'll try to update KTX again tomorrow!