Search code examples
javacodenameone

I'm getting this error while running my codenameone application and i didn't know what's the exact problem


java.lang.ArrayIndexOutOfBoundsException: 0 at com.codename1.ui.plaf.UIManager.initFirstTheme(UIManager.java:2156) at com.mycompany.myapp.MyApplication.init(MyApplication.java:33) 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:498) at com.codename1.impl.javase.Executor$4$1.run(Executor.java:308) at com.codename1.ui.Display.processSerialCalls(Display.java:1368) at com.codename1.ui.Display.mainEDTLoop(Display.java:1155) at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120) at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)

Solution

  • Your theme file is missing or broken. I guess you created it via an old method. I suggest using https://start.codenameone.com/ to create a maven project which is the preferred way to create Codename One applications. Notice it no longer requires the plugins.