Comments (6)
Sad to say... Qt5.14 have bugs on AAB build format, this cause app crash on launching (Store upload is ok. )
Currently, I still use APK build with multi APKs upload for a release.
NOTE for all :)
from qtfirebase.
SOLVED MY SELF.
PUT IT HERE IF ANYONE NEED IT
Scenario: build QtFirebase using .pri with AAB support ARMv7 & ARMv8 (and both x86, x86_64 but not tested yet)
Environments:
- Qt 5.14.1
- QtCreator 4.11.rc (preview)
- Firebase (latest up to now 6.9 or something)
- QtFirebase 1.2.7
- gradle:3.5.0
Projects: Qt Subdirs Projects with Quick application & 5 Qt plugins library & pre-built SSL Libraries
problem is about linking libc++.
In baseapp.pro -> disable QMAKE_LFLAGS += -nostdlib++
line or add !versionAtLeast(QT_VERSION, "5.14.0"): QMAKE_LFLAGS += -nostdlib++
(or both if use want it)
Some other problems will come from building old project with new format of Android SDK and QtCreator.
Here are few steps you need to:
- Backup your
android
source inANDROID_PACKAGE_SOURCE_DIR
. - Using QtCreator to create template
AndroidManifest.xml
(BEWARE: new manifest use some meta for lib / asset, make sure you have it in your project or delete it and use old source) - Merge all firebase
com.google.firebase
service from old manifest to generated manifest - Merge all
build.gradle
to generatedbuild.gradle
- in BaseApp.pro delete some configs if you had it in your code or QMAKE will generate wrong deployment.json file (I don't know why since the output is not changed :) )
TEMPLATE = app
TARGET = $$qtLibraryTarget($$TARGET)
- update your Path in .pri file of
qtfirebase_target.pri
- in
-F$$QTFIREBASE_FRAMEWORKS_ROOT
Latest firebase useFirebase<module>
(ex: FirebaseMessaging) instead of (ex: Messaging) folder. update it if you use latest firebase - replace
$$ANDROID_TARGET_ARCH
to$${QT_ARCH}
:) Same !! (Do not know why because they have same values when running qmake but it works =)) )
- in all of your pro / pri, if you include your plugins, change the linking of library to make sure library are built and link correctly with platforms
Example:
Old source
LIBS += -L../GeneralPlugins/ -lGeneralPlugins
ANDROID_EXTRA_LIBS += $$OUT_PWD/../GeneralPlugins/libGeneralPlugins.so
Updated
LIBS += -L../GeneralPlugins/ -lGeneralPlugins_$${QT_ARCH}
ANDROID_EXTRA_LIBS +=
That's all :) you will have them on store
Read more about format of structure of AAB if you need to add anything to native Android.
https://developer.android.com/guide/app-bundle?authuser=1
from qtfirebase.
Hi @chaunnt,
I haven't had the guts to use the AAB feature yet as the Qt support for it is in a way too early stage/bleeding edge to my liking. Personally I use multiple APK's for all my projects. That said I can't see why it shouldn't work because of QtFirebase? Latest QtFirebase (master branch) builds fine individually with all supported arch's on my setup.
Judging from your output there seem to be a mix of Android NDK's?
I see both r16b
and r20
in the output? I've had similar vtable
errors in one of my projects but at this time of writing I can't remember how I fixed them - stackoverflow will probably give you some hints. I think it was something with the toolchain using the wrong paths when compiling for arm64_v8a
(I.e armv7a
and arm64_v8a
was used/mixed in the build phase). Try using Android NDK r20
only and double check your paths - and see if that will solve your problems?
Happy bug hunt!
from qtfirebase.
Updated answer ^
from qtfirebase.
@chaunnt - thanks for posting a solution. I will have an extra look - and see if we can detect AAB builds somehow and make this easier
from qtfirebase.
I got the build on Android with Qt 5.14.2 working in AAB bundle for armv7 and armv8 (not x86 targets). To be found on QtFirebaseExample as a PR which cannot be closed due to complexity, but still serves a working example.
from qtfirebase.
Related Issues (20)
- Using Qtfirebase HOT 13
- Cloud Storage HOT 5
- Getting Value from Firebase Real-time Database (Qt c++) HOT 1
- QString::sprintf was removed in Qt 5.14.x? HOT 11
- Compatible Firebase SDK versions HOT 1
- Not able to Create QtFirebase object in my main.qml for Android. HOT 2
- Links markdown broken HOT 1
- Bundle of improvements HOT 3
- Provide a CLI to be run qmake HOT 13
- Debugging console HOT 9
- Code signing error HOT 5
- Push notifications while in foreground HOT 9
- Can't compile with QTFIREBASE_CONFIG += analytics messaging for iOS HOT 2
- Qt 6 Support ? HOT 1
- Subscribing to topic nets no result HOT 6
- Linking failed on iOS HOT 10
- Build project with CMakeLists.txt instead of .pro HOT 2
- Subscribe method isn't working on the latest firebase_cpp_sdk (10.0.0) HOT 1
- Qt create how to config my kit HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qtfirebase.