ClassCastException running project in IntelliJ Idea 2016.1.1 #1
Comments
Hi, This probably happens when the plugin is trying to build a module, which is not "Connect IQ" module. There is no simple way to change module type in IntelliJ, but you can recreate the module by removing the module from project (there's a delete button in that same project structure dialog) and then importing it again and selecting "create module from existing sources". If IDEA will ask you if you want to overwrite the old model say yes. I did some fixes lately to importing from existing sources, which are not yet released, so I'm not quite sure how well the latest released plugin handles this. After importing, make sure to mark sources and resources directories in that dialog (sources will be automatically marked in the future release, but resources not). Also you need to select the device to which the building is done. Unfortunately you currently need to set target device in module settings and in run configuration. As one is used for simply building the module without running it (I guess I should enhance this process that when running the building device will be set to whatever is used in that run configuration). I'll exclude non-Connect IQ modules from building by the plugin to avoid the error. |
Hi, |
Two other things I had to do:
|
Can you tell me what error you get when you use IQ SDK as project SDK? |
The error was: Error:Module 'mymodule' production: java.lang.RuntimeException: could not find JDK |
Alright, thanks. This is probably the case that if JAVA_HOME environment variable is not set, it tries to use that one instead. I have had similar issue reported by another user as well and might do something about it. So another workaround at the moment is to set JAVA_HOME to JDK home. But if using JDK as project SDK (while still using IQ SDK as module SDK) helps, then that's fine too. |
Both issues should be fixed with 0.2.2 release now. |
I created a new project and when trying to run it, I receive the stack trace below. I am using:
IntelliJ 2016.1.1: Build #IU-145.597, built on March 29, 2016
JRE: 1.8.0_60-b27 x86
JVM: Java HotSpot(TM) Server VM by Oracle Corporation
The text was updated successfully, but these errors were encountered: