2

I wasn't sure if I was supposed to respond to this post (CodenameOne stopped working after build) or post a new one.

The IDE that I am using is IntelliJ. When I open up a codename one project, it does not recognize that it is a codename one project (the codename one button is grey).

I also get the following error when I try to run it in the device simulator:

Exception in thread "main" java.lang.ClassNotFoundException: com.codename1.impl.javase.Simulator

However, when I move the files into a new project and copy and paste the text into the main class, it runs. So there is no problem with the codename one configuration or my files.

Why am I getting this error and why does it only work when I copy and paste it into a new project?

Vasilis G.
  • 7,556
  • 4
  • 19
  • 29
  • A new question is good here. What do you see in the project directory? Did you change any IntelliJ settings? If you do a directory diff between the new and old project is there a configuration change that you see that might have impacted this? – Shai Almog Dec 06 '17 at 05:03
  • 1
    I have the same behavior. I created a new project cloning a remote git project. creating a project using this approach causes the problem. The codenameone' s plugin for Intellij doesn' t recognize the project as a cn1 project. When I run or debug it, the compiler can't find any cn1 class. Also, no Codenameone options are available when I click over the project name using the right button of the mouse. What do I need to do to solve that? – hrugani Jan 24 '19 at 13:16

1 Answers1

0

You are missing the JavaSE.jar file. Make sure the file is the root project folder and on project properties on libraries on the run section make sure the dependency of the JavaSE is there