IntelliJ Unity3d Plugin Not Finding Classes

Unity3d Plugin Cannot Find UnityPlayerActivity with IntelliJ

End of the world sale

After JetBrains had their end of the world sale at 75% off I ended up with 3 much needed tools for my game and app development. First I bought ReSharper my favorite re-factoring tool. Then I bought AppCode for iPhone development, and Finally I bought IntelliJ IDEA to replace Eclipse.

I never used IntelliJ and my only hope was that it would have better re-factoring than Eclipse. I am happy with its re-factoring capabilities however when I built the project I found that everything that worked in Eclipse failed to work in Unity3d 3.5. 

When making a plugin I got the following error:

01-08 19:13:35.678: E/AndroidRuntime(9029): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{}: java.lang.ClassNotFoundException: com.example.unityplugin.ExampleUnityActivity in loader dalvik.system.PathClassLoader[/mnt/asec/]

Amazingly my searches returned little to know information...

Search Terms

"Unity3d IntelliJ"
"Unity3d IntelliJ Problem"
"Unity3d IntelliJ ClassNotFound"

eventually I searched: "Unity cannot find my java class"

Which tipped me off to the last of many answers.


The reason the classes were not showing up in the Jar Artifact was the JDK I was using. I Installed IntelliJ with JDK 1.7, however eclipse uses its own compiler, which must ad-hear more to what ever 1.6 does. So I was able to fix the problem by going to File/ProjectSettings in IntelliJ (Ctrl+Alt+Shift+S) and set your SDK to 1.6. This should make the classes show up! 


Post a Comment

Note: Only a member of this blog may post a comment.