title: Using Firebase in Gluon-mobile
body: <p>I want to use  Firebase Database in the my <strong>Gluon-mobile Project</strong> , after Reading the  <a href="https://firebase.google.com/docs/android/setup/" rel="nofollow noreferrer">Firebase Docs</a>.I tried to this make some modifications to the <em>root</em> level <a href="https://bitbucket.org/guru001/firebase_javafx/src/096da91a5eb51cc4502b665ae0a89ff1b2e0863b/build.gradle?at=master&amp;fileviewer=file-view-default" rel="nofollow noreferrer">build.gradle</a> and <em>App</em> level <a href="https://bitbucket.org/guru001/firebase_javafx/src/096da91a5eb51cc4502b665ae0a89ff1b2e0863b/SampleFirebaseApp/build.gradle?at=master&amp;fileviewer=file-view-default" rel="nofollow noreferrer">build.gradle</a> files.<br>Am trying to use <a href="https://www.google.co.in/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwjC14yZiJPYAhXELI8KHURbCDsQFggnMAA&amp;url=https%3A%2F%2Ffirebase.google.com%2Fdocs%2Fstorage%2F&amp;usg=AOvVaw1rIkIFnQ-TiCErZxqKVecb" rel="nofollow noreferrer">Firebase storge</a> in my <a href="https://bitbucket.org/guru001/firebase_javafx" rel="nofollow noreferrer">project</a> and Here's what I Tried.<br></p>
  
  <p>Controller class <em><strong>SignupController.java</em></strong> in package <em>com.application.control</em>.</p>
  
  <pre><code> package com.application.control;
   public class SignupController implements Initializable
   {
  @Override
  public void initialize(URL location, ResourceBundle resources)
  {
  
      if(Platform.isAndroid())
      {
          try {
            Firebase firebase = (Firebase) Class.forName("com.application.FirebaseInit").newInstance();
            firebase.startup();
          } catch (InstantiationException e) {
              e.printStackTrace();
          } catch (IllegalAccessException e) {
              e.printStackTrace();
          } catch (ClassNotFoundException e) {
              e.printStackTrace();
          }
      }
      System.out.println("Signup");
  }
  }
  </code></pre>
  
  <p>And the <strong><em>FirebaseInit.java</em></strong> which is in <code>android/java/</code> dir and <code>com.application</code> package which performs Initialization of Firebase Storage.</p>
  
  <pre><code>   package com.application;
     public class FirebaseInit implements Firebase{
     public FirebaseInit()
     {
     }
  
   @Override
   public void startup()
   { 
      Context context=FXActivity.getInstance().getApplicationContext();
      FirebaseStorage storage =null;
      FirebaseApp.initializeApp(context);
      storage=FirebaseStorage.getInstance();
      if(storage!=null)
      {
  
           Toast.makeText(context,"Firebase Storage success",Toast.LENGTH_LONG).show();
      }
      else
          Toast.makeText(context,"Firebase Storage failed",Toast.LENGTH_LONG).show();
  }
  }
  </code></pre>
  
  <p><strong><em>Firebase.java</em></strong> is just a Interface which is used to kick start Initialization in the controller.</p>
  
  <pre><code>package com.application;
  
  public interface Firebase
  {
  public void startup();
   }
  </code></pre>
  
  <p>And on startup am getting these below Error on <strong>Android</strong> Device.</p>
  
  <pre><code>12-18 12:01:39.133  4279  4304 W javafx  : Loading FXML document with JavaFX API of version 8.0.102 by JavaFX runtime of version 8.0.72-ea
  12-18 12:01:39.205  4279  4304 W System.err: Exception in Application start method
  12-18 12:01:39.207  4279  4304 I System.out: QuantumRenderer: shutdown
  12-18 12:01:39.208  4279  4299 W System.err: java.lang.reflect.InvocationTargetException
  12-18 12:01:39.208  4279  4299 W System.err:    at java.lang.reflect.Method.invoke(Native Method)
  12-18 12:01:39.208  4279  4299 W System.err:    at javafxports.android.DalvikLauncher$1.run(DalvikLauncher.java:188)
  12-18 12:01:39.208  4279  4299 W System.err:    at java.lang.Thread.run(Thread.java:818)
  12-18 12:01:39.208  4279  4299 W System.err: Caused by: java.lang.RuntimeException: Exception in Application start method
  12-18 12:01:39.208  4279  4299 W System.err:    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
  12-18 12:01:39.208  4279  4299 W System.err:    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$138(LauncherImpl.java:182)
  12-18 12:01:39.208  4279  4299 W System.err:    at com.sun.javafx.application.LauncherImpl.access$lambda$1(LauncherImpl.java)
  12-18 12:01:39.208  4279  4299 W System.err:    at com.sun.javafx.application.LauncherImpl$$Lambda$2.run(Unknown Source)
  12-18 12:01:39.208  4279  4299 W System.err:    ... 1 more
  12-18 12:01:39.208  4279  4299 W System.err: Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/R$string;
  12-18 12:01:39.209  4279  4299 W System.err:    at com.google.android.gms.common.internal.zzca.&lt;init&gt;(Unknown Source)
  12-18 12:01:39.209  4279  4299 W System.err:    at com.google.firebase.FirebaseOptions.fromResource(Unknown Source)
  12-18 12:01:39.209  4279  4299 W System.err:    at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
  12-18 12:01:39.209  4279  4299 W System.err:    at com.application.FirebaseInit.startup(FirebaseInit.java:21)
  12-18 12:01:39.209  4279  4299 W System.err:    at com.application.control.SignupController.initialize(SignupController.java:36)
  12-18 12:01:39.209  4279  4299 W System.err:    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548)
  12-18 12:01:39.209  4279  4299 W System.err:    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
  12-18 12:01:39.209  4279  4299 W System.err:    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3214)
  12-18 12:01:39.209  4279  4299 W System.err:    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175)
  12-18 12:01:39.209  4279  4299 W System.err:    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148)
  12-18 12:01:39.209  4279  4299 W System.err:    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124)
  12-18 12:01:39.209  4279  4299 W System.err:    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104)
  12-18 12:01:39.209  4279  4299 W System.err:    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097)
  12-18 12:01:39.209  4279  4299 W System.err:    at com.application.scenes.SignupPresenter.getView(SignupPresenter.java:17)
  12-18 12:01:39.209  4279  4299 W System.err:    at com.application.Main.start(Main.java:40)
  12-18 12:01:39.209  4279  4299 W System.err:    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$145(LauncherImpl.java:863)
  12-18 12:01:39.209  4279  4299 W System.err:    at com.sun.javafx.application.LauncherImpl.access$lambda$8(LauncherImpl.java)
  12-18 12:01:39.209  4279  4299 W System.err:    at com.sun.javafx.application.LauncherImpl$$Lambda$9.run(Unknown Source)
  12-18 12:01:39.209  4279  4299 W System.err:    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$158(PlatformImpl.java:326)
  12-18 12:01:39.209  4279  4299 W System.err:    at com.sun.javafx.application.PlatformImpl.access$lambda$6(PlatformImpl.java)
  12-18 12:01:39.209  4279  4299 W System.err:    at com.sun.javafx.application.PlatformImpl$$Lambda$7.run(Unknown Source)
  12-18 12:01:39.209  4279  4299 W System.err:    at com.sun.javafx.application.PlatformImpl.lambda$null$156(PlatformImpl.java:295)
  12-18 12:01:39.210  4279  4299 W System.err:    at com.sun.javafx.application.PlatformImpl.access$lambda$18(PlatformImpl.java)
  12-18 12:01:39.210  4279  4299 W System.err:    at com.sun.javafx.application.PlatformImpl$$Lambda$19.run(Unknown Source)
  12-18 12:01:39.210  4279  4299 W System.err:    at java.security.AccessController.doPrivileged(AccessController.java:52)
  12-18 12:01:39.210  4279  4299 W System.err:    at com.sun.javafx.application.PlatformImpl.lambda$runLater$157(PlatformImpl.java:294)
  </code></pre>
  
  <p>Please Enlighten me , how to use Firebase with Gluon-mobile.</p>