CodeName One error: cannot find character

I created a simple sample application with CodeNameOne without any changes. The certificate and Provisioning file is available and configured as project properties.

IDE: Eclipse Desktop OS: Windows

Performing 'Send IOS Debug Build' starts the build server and displays the following error: / var / folders / p 7 / d3z112yd0156kxkm2p21p8ym0000gn / T / build5327647990993852705xxx / stub / TestBuildDeployStub.java / var / folders / p 7 / d3z112yd0156kxkm2p21p8ym0000gn / T / build5327647990993852705xxx / stub / TestBuildDeployStub.java:14: error: cannot find private symbol TestBuildDeploy i; ^ symbol: class TestBuildDeploy location: class TestBuildDeployStub / var / folders / p 7 / d3z112yd0156kxkm2p21p8ym0000gn / T / build5327647990993852705xxx / stub / TestBuildDeployStub.java: 23: error: I cannot find the symbol I = new Test; ^ symbol: class TestBuildDeploy location: class TestBuildDeployStub Note: / var / folders / p 7 / d3z112yd0156kxkm2p21p8ym0000gn / T / build5327647990993852705xxx / stub / TestBuildDeployStub.java uses or cancels the deprecated API. Note: recompiling with -Xlint: deprecation for details. 2 errors

This is the java class:

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

}
+4
source share
1 answer

If you changed the package / class of the Codename One application after creating it, you need to change it everywhere both in the project and in codenameone_settings.properties, so we recommend that you never change it.

We do not make this process easy, as you are married to creating a package name. This is used to uniquely identify you in stores and cannot be changed even once the application is sent, so you need to understand that this is not what you should do ... Give the package name a deep look before creating the application!

+4
source

All Articles