CodenameOne在构建后停止工作

CodenameOne在构建后停止工作

问题描述:

我对codenameone遇到了一个奇怪的问题,甚至不知道出了什么问题。我尝试过发送Windows Phone版本,但从那以后我再也没有做过任何更改。但是,这样做之后,模拟器将无法启动,并一直说我的输入错误。他们不是,建议的解决方案是在已经导入的情况下导入。

I have an odd issue with codenameone, and I'm not even sure what went wrong. I've tried to "send windows phone build", and don't think I have changed anything else since then. However, after I did so the simulator wouldn't launch and kept saying my imports were wrong. They weren't, the suggested solution was importing once that were already in.

我收到的错误

Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.codename1.impl.javase.Simulator.main(Simulator.java:59)
Caused by: java.lang.ClassNotFoundException: com.mycompany.myapp.MyApplication
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.findSystemClass(Unknown Source)
at com.codename1.impl.javase.ClassPathLoader.findClass(ClassPathLoader.java:100)
at com.codename1.impl.javase.ClassPathLoader.loadClass(ClassPathLoader.java:50)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.codename1.impl.javase.Executor.main(Executor.java:45)
... 5 more

他找不到的所有类实际上都在我的解决方案中,我已经尝试过将它们重新添加到构建路径中。

All the classes he can't find are actually in my solution, I already tried re-adding them to the build path. Any suggestions?

这很奇怪。

首先检查一下您的确仍然拥有包 com.mycompany.myapp ,其中有公共类 MyApplication 。干净构建项目,然后查看此类是否放入dist文件夹下的jar文件中。

First check that you indeed still have the package com.mycompany.myapp where you have the public class MyApplication. Do a clean build of the project and see if this class makes it into the jar file under the dist folder.