CodeName一个错误:找不到符号

时间:2016-06-02 11:21:04

标签: codenameone

我使用CodeNameOne创建了一个简单的示例应用程序而没有任何更改。 证书和供应文件可用并配置为项目属性。

IDE:Eclipse 桌面操作系统:Windows

  

执行'Send IOS Debug Build'启动服务器构建并显示   以下错误:   /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build5327647990993852705xxx/stub/TestBuildDeployStub.java   /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build5327647990993852705xxx/stub/TestBuildDeployStub.java:14:   错误:找不到符号私有的TestBuildDeploy i;           ^符号:类TestBuildDeploy位置:类TestBuildDeployStub   /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build5327647990993852705xxx/stub/TestBuildDeployStub.java:23:   错误:找不到符号i = new TestBuildDeploy();           ^符号:类TestBuildDeploy位置:类TestBuildDeployStub注意:   /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build5327647990993852705xxx/stub/TestBuildDeployStub.java   使用或覆盖已弃用的API。注意:重新编译   -Xlint:弃用细节。 2个错误

这是java类:

package com.canda.mario.myapp;


import com.codename1.ui.Display;
import com.codename1.ui.Form;
import com.codename1.ui.Dialog;
import com.codename1.ui.Label;
import com.codename1.ui.plaf.UIManager;
import com.codename1.ui.util.Resources;
import com.codename1.io.Log;
import com.codename1.ui.Toolbar;
import java.io.IOException;

/**
 * This file was generated by <a href="https://www.codenameone.com/">Codename One</a> for the purpose
 * of building native mobile applications using Java.
 */
public class TestBuildDeploy {

    private Form current;
    private Resources theme;

    public void init(Object context) {
        theme = UIManager.initFirstTheme("/theme");

        // Enable Toolbar on all Forms by default
        Toolbar.setGlobalToolbar(true);

        // Pro only feature, uncomment if you have a pro subscription
        // Log.bindCrashProtection(true);
    }

    public void start() {
        if(current != null){
            current.show();
            return;
        }
        Form hi = new Form("Hi World");
        hi.addComponent(new Label("Hi World"));
        hi.show();
    }

    public void stop() {
        current = Display.getInstance().getCurrent();
        if(current instanceof Dialog) {
            ((Dialog)current).dispose();
            current = Display.getInstance().getCurrent();
        }
    }

    public void destroy() {
    }

}

1 个答案:

答案 0 :(得分:4)

如果您在创建Codename One应用程序后更改其包/类,则需要在项目和codenameone_settings.properties中的任何位置更改它,这就是我们建议永远不要更改它的原因。

由于您在创建包名时与生活结婚,因此我们不会轻松完成此过程。这用于在商店中唯一标识您,并且在提交应用程序后无法更改,因此您需要了解这不是您应该做的事情...在创建应用程序之前,请深入考虑包名称!< / p>