Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Not able to Create QtFirebase object in my main.qml for Android.
Forum Updated to NodeBB v4.3 + New Features

Not able to Create QtFirebase object in my main.qml for Android.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 275 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KGaurav_123
    wrote on last edited by
    #1

    Not able to Create QtFirebase object in my main.qml.

    I followed this link :- https://firebase.google.com/docs/android/setup and attached the available QtFirebase from https://github.com/Larpon/QtFirebase.

    My Compiler is :- Qt 5.14.1 for Android

    I am able to build the project and deploy the application on android tab successfully and it is notified on the firebase server after deploying on tab.

    But when i am creating Analytics Object in main.qml, it is giving below error :-

    W System.err: java.lang.NoSuchMethodError: no non-static method "Lcom/google/firebase/FirebaseApp;.isDataCollectionDefaultEnabled()Z"
    W System.err: at org.qtproject.qt5.android.QtNative.startQtApplication(Native Method)
    W System.err: at org.qtproject.qt5.android.QtNative$7.run(QtNative.java:390)
    W System.err: at org.qtproject.qt5.android.QtThread$1.run(QtThread.java:61)
    W System.err: at java.lang.Thread.run(Thread.java:764)
    W System.err: java.lang.NoSuchMethodError: no non-static method "Lcom/google/firebase/FirebaseApp;.setDataCollectionDefaultEnabled(Z)V"
    W System.err: at org.qtproject.qt5.android.QtNative.startQtApplication(Native Method)
    W System.err: at org.qtproject.qt5.android.QtNative$7.run(QtNative.java:390)
    W System.err: at org.qtproject.qt5.android.QtThread$1.run(QtThread.java:61)
    W System.err: at java.lang.Thread.run(Thread.java:764)
    E firebase: Java class com/google/firebase/platforminfo/GlobalLibraryVersionRegistrar not found. Please verify the AAR which contains the com/google/firebase/platforminfo/GlobalLibraryVersionRegistrar class is included in your app.
    E firebase: clazz
    F firebase: Java class com/google/firebase/platforminfo/GlobalLibraryVersionRegistrar not found. Please verify the AAR which contains the com/google/firebase/platforminfo/GlobalLibraryVersionRegistrar class is included in your app.
    F libc : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 23350 (qtMainLoopThrea), pid 23223 (.jbl.eoncompact)

    It is failing in the below line available at qtfirebare.cpp used to create object for android platform.
    _firebaseApp = firebase::App::Create(firebase::AppOptions(), env, activity);

    I have added below dependencies in my build.gradle file :-

    classpath 'com.google.gms:google-services:4.3.3'.
    implementation 'com.google.android.gms:play-services-base:15.0.1'
    implementation 'com.google.firebase:firebase-core:16.0.1'
    implementation 'com.google.firebase:firebase-common:16.0.0'
    apply plugin: 'com.google.gms.google-services'
    Please see the attached file for complete error. please help me.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      That's something you should bring the authors of that module. They are going to be more likely able to help you in your situation.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved