gpt4 book ai didi

codenameone - 代号一错误: cannot find symbol

转载 作者:行者123 更新时间:2023-12-01 00:41:19 25 4
gpt4 key购买 nike

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

IDE: eclipse
桌面操作系统:Windows

Executing 'Send IOS Debug Build' starts the server build and shows the following error: /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build5327647990993852705xxx/stub/TestBuildDeployStub.java /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build5327647990993852705xxx/stub/TestBuildDeployStub.java:14: error: cannot find symbol private TestBuildDeploy i; ^ symbol: class TestBuildDeploy location: class TestBuildDeployStub /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build5327647990993852705xxx/stub/TestBuildDeployStub.java:23: error: cannot find symbol i = new TestBuildDeploy(); ^ symbol: class TestBuildDeploy location: class TestBuildDeployStub Note: /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build5327647990993852705xxx/stub/TestBuildDeployStub.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 2 errors



这是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() {
}

}

最佳答案

如果您在创建 Codename One 应用程序后更改它的包/类,您需要在项目和 codenameone_settings.properties 中的任何地方更改它。这就是为什么我们建议永远不要更改它。

我们不会让这个过程变得简单,因为您在创建包名称时已经结婚了。这用于在商店中唯一标识您,并且一旦提交应用程序就无法更改,因此您需要了解这不是您应该做的事情......在创建应用程序之前要深入考虑包名称!

关于codenameone - 代号一错误: cannot find symbol,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37590391/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com