在启动时删除 gluon-mobile 对话框

Remove gluon-mobile dialog at startup

我是 Android 使用 javafx 进行应用程序开发(使用 javafxports 和 gluon-mobile)的新手。
我是否使用 gluon-Api 通过扩展 MobileApplication class .
Using the sample programs 来构建我的项目。我正在尝试制作我自己的版本。
但是,在开始的时候应用正在收到这个不需要的对话框。

我在谈论这个让 出现在应用程序启动时的对话框。

这是我的代码。我已经扩展了 MobileApplication class to create my own version of App based on the samples.

    package com.gluonapplication;

    import com.gluonapplication.views.Home;
    import com.gluonhq.charm.glisten.application.MobileApplication;
    import static com.gluonhq.charm.glisten.application.MobileApplication.HOME_VIEW;

    /**
     *
     * @author Guru
     */
     public class MainApplication extends MobileApplication {

     public void init()
     {
      addViewFactory(HOME_VIEW,() -> new Home(HOME_VIEW).getView());


     }

     public void postinit()
     {

     }

     public void start()
     {

     }
     }

这里是主页 class,returns 应用程序的主页视图。

包 com.gluonapplication.views;

    import com.gluonhq.charm.glisten.mvc.View;
    import java.io.IOException;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javafx.fxml.FXMLLoader;

    /**
     *
     * @author Guru
     */
    public class Home {
    View view; 
    String name;
    public Home(String name)
    {
    this.name=name;
    }


    public  View  getView()
    {
    try 
    {
        view=FXMLLoader.load(Home.class.getResource("HomeView.fxml"));

       view.setName(name);
    } 
    catch (IOException ex) 
     {
       Logger.getLogger(Home.class.getName()).log(Level.SEVERE, null, ex);
       ex.printStackTrace();
       return new View(name);
      }
      return view;
      }
      }

这是 HomeView.fxml 文件,其 Root 是 View .

    <?xml version="1.0" encoding="UTF-8"?>

    <?import com.gluonhq.charm.glisten.mvc.View?>
    <?import com.jfoenix.controls.JFXButton?>
    <?import javafx.scene.control.Label?>
    <?import javafx.scene.image.ImageView?> 
    <?import javafx.scene.layout.AnchorPane?>
    <?import javafx.scene.layout.BorderPane?>
    <?import javafx.scene.layout.VBox?>
    <View prefHeight="600.0" prefWidth="350.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1">
    <center>
    < VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" spacing="15" BorderPane.alignment="CENTER">
     <children>
        <Label text="Welcome Back!" />
        <AnchorPane prefHeight="254.0" prefWidth="253.0">
           <children>
              <ImageView fitHeight="254.0" fitWidth="234.0" layoutX="56.0" pickOnBounds="true" preserveRatio="true">

          </ImageView>
           </children>
        </AnchorPane>
        <JFXButton text="Continue" />
     </children>
  </VBox>

提前致谢,请帮助我阻止此对话框出现!

您在项目中使用的 Gluon Mobile 库不是开源库。

你可以找到关于它的所有信息here

虽然您可以免费完全试用该库(100% 的功能),但您会在启动时看到这个 nag window。

您可以通过购买许可证来摆脱它,或者如果它是开源的project or you are a student