I have invalid "unresolved compilation problems" in codenameone:
The project has valid syntax and works fine on other systems.
However, on my system, I have strange compilation errors... It says that the specified function is undefined, but actually it is defined. Here is one example:
For the following code line:
Container c = new Container();
Label l = new Label ("label");
c.add(l);
(I import com.codename1.ui.Container and import com.codename1.ui.Label)
I get the following error:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.codename1.impl.javase.Executor$1$1.run(Executor.java:100)
at com.codename1.ui.Display.processSerialCalls(Display.java:1144)
at com.codename1.ui.Display.mainEDTLoop(Display.java:963)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
Caused by: java.lang.Error: Unresolved compilation problem:
The method add(Label) is undefined for the type Container
at com.mycompany.hi.HiWorld.start(HiWorld.java:53)
... 9 more
It compiles fine if I change c.add(l) to c.addComponent(l).
I have the latest version of codenameone (1.0.0.201511241324) and java jdk (jdk1.8.0_65).
Thanks!