Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  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 General and Desktop
2 Posts 2 Posters 267 Views
  • 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 :-

    1. classpath 'com.google.gms:google-services:4.3.3'.
    2. implementation 'com.google.android.gms:play-services-base:15.0.1'
    3. implementation 'com.google.firebase:firebase-core:16.0.1'
    4. implementation 'com.google.firebase:firebase-common:16.0.0'
    5. apply plugin: 'com.google.gms.google-services'

    Please see the attached file for complete error. please help me.

    jsulmJ 1 Reply Last reply
    0
    • K KGaurav_123

      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 :-

      1. classpath 'com.google.gms:google-services:4.3.3'.
      2. implementation 'com.google.android.gms:play-services-base:15.0.1'
      3. implementation 'com.google.firebase:firebase-core:16.0.1'
      4. implementation 'com.google.firebase:firebase-common:16.0.0'
      5. apply plugin: 'com.google.gms.google-services'

      Please see the attached file for complete error. please help me.

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @KGaurav_123 Please don't double post
      https://forum.qt.io/topic/113396/not-able-to-create-qtfirebase-object-in-my-main-qml-for-android
      Closing this

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

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