Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Blackberry 如何配置黑莓应用程序正常工作(在模拟器上工作,但在智能手机上不工作)?_Blackberry_Blackberry Simulator_Smartphone - Fatal编程技术网

Blackberry 如何配置黑莓应用程序正常工作(在模拟器上工作,但在智能手机上不工作)?

Blackberry 如何配置黑莓应用程序正常工作(在模拟器上工作,但在智能手机上不工作)?,blackberry,blackberry-simulator,smartphone,Blackberry,Blackberry Simulator,Smartphone,我写了一个有两个屏幕的应用程序。第一个屏幕由主类触发。通过单击第一个屏幕中的按钮打开第二个屏幕 public class MyApp extends UiApplication{ public static void main(String[] args){ MyApp theApp = new MyApp(); theApp.enterEventDispatcher(); } public MyApp(){

我写了一个有两个屏幕的应用程序。第一个屏幕由主类触发。通过单击第一个屏幕中的按钮打开第二个屏幕

public class MyApp extends UiApplication{
    public static void main(String[] args){
        MyApp theApp = new MyApp();       
        theApp.enterEventDispatcher();
    }

    public MyApp(){        
        // Push a screen onto the UI stack for rendering.
        pushScreen(new MyScreen());
    }
} 

public class MyScreen extends MainScreen implements FieldChangeListener
{
    BasicEditField mEdit = null; 
    ButtonField mButton = null;

    public MyScreen() 
    {
        super();                
        mEdit = new BasicEditField("input: ", "some text");
        add(mEdit);
        mButton = new ButtonField("Go second screen");
        mButton.setChangeListener(this);
        add(mButton);
    }
    public void fieldChanged(Field field, int context) 
    {
        if(mButton == field)
        {
            MyScreen2 scr = new MyScreen2();
            scr.setTextValue(mEdit.getText());
            UiApplication.getUiApplication().pushScreen(scr);
            UiApplication.getUiApplication().popScreen(this);
        }
    }
}

public final class MyScreen2 extends MainScreen 
{
    String mTextValue = null;
    LabelField mLabel = null;

    public void setTextValue(String textValue) 
    {
        mTextValue = textValue;
        mLabel.setText(mTextValue);
    }

    public MyScreen2() 
    {
        super();        
        mLabel = new LabelField();
        add(mLabel);
    }
}
它可以在9700模拟器上工作,但不能在智能手机上工作。我想知道怎么了?我想知道智能手机是否会阻止从我的电脑加载应用程序

我试着签名,但没什么变化


有什么想法吗?

您需要签名密钥才能在真实设备上运行应用程序。。。大约20美元

你可以在这里找到所有的细节

我想这可能对你有帮助 干杯