How do I add Firebase SDK to Qt Android app?
-
I am trying to add firebase sdk to my qt android application, I followed the instructions on Firbase documentation but there are a lot of this missing, like firebase asks me to have a root level
build.gradle
and an app-levelbuild.gradle
, but qt only generates onebuild.gradle
in the build folder underandroid-build
. So what I do in this case? The firebase instructions I am following can be found here: https://firebase.google.com/docs/cpp/setup?platform=android#add-config-file. The documentation also asks for asettings.gradle
but that isn't generated by qt either. -
you only need to use build.gradle file ,
you can obtain the QT template used when building the apk
once you build the QT , look for your build folder , its one folder up from your root project folder , build-{projectname}-Qt{VersionMajor} -{Architecture}-{BuildType}
then look for android-build, inside that folder you will find the manifest, build.gradle , res, assets , and other folder need by QT , copy the files and folders that i mentioned do not copy the any other folders except res and assets only , then the 2 files manifest and build.gradle , you will need other files/folders for much deep purposes ,copy the files to your root project folder but inside android folder(if there is none , create it) ,
then on your cmake /qt.pro point the ANDROID_PACKAGE_SOURCE_DIR to the android folder then you can now add the firebase sdk from that build.gradle ,