After doing some research, I was able to integrate QtFirebase into my Qt Android application, but I am encountering the RunTime issue below. I have tried various solutions, but the issue still persists.
I am encountering a runtime issue with my Android project using Qt and Firebase. Upon attempting to launch the app, it crashes with the following error:
`W Zygote : Unable to open libbeluga.so: dlopen failed: library "libbeluga.so" not found.
E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.croyance.messenger/com.croyance.messenger.Main}: java.lang.ClassNotFoundException: Didn't find class "com.croyance.messenger.Main" on path: DexPathList...
The full logs can be found below. It seems that both the libbeluga.so native library and the Main activity are missing from the APK, which causes the application to fail at runtime. Additionally, there are several warnings related to Firebase initialization and some ANR (Application Not Responding) logs, which may be relevant.
`W Zygote : Unable to open libbeluga.so: dlopen failed: library "libbeluga.so" not found.
I libc : SetHeapTaggingLevel: tag level set to 0
I yance.messenge: Late-enabling -Xcheck:jni
I yance.messenge: Unquickening 21 vdex files!
E yance.messenge: Unknown bits set in runtime_flags: 0x40000000
E RefClass: java.lang.reflect.InvocationTargetException
I OneTrace: Mark active for pid=25278? true
E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.croyance.messenger.Main" on path: DexPathList[[zip file "/data/app/~~AaqN-4a0auFr8HV_MJwQ3g==/com.croyance.messenger-itiNKy_Da7NGfGLvDCWqRw==/base.apk"],nativeLibraryDirectories=[/data/app/~~AaqN-4a0auFr8HV_MJwQ3g==/com.croyance.messenger-itiNKy_Da7NGfGLvDCWqRw==/lib/arm64...
I have correctly configured the AndroidManifest.xml file with the following activity declaration for Main:
<activity
android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density"
android:name=".Main"
android:label="FireBaseQTVersion1"
android:screenOrientation="unspecified"
android:launchMode="singleTop">
</activity>
I have followed the setup guidelines for Android in the QtFirebase documentation, specifically as outlined in the Setup.
Environment:
Qt Version: 5.15.2
Firebase C++ SDK Version: 6.7.0
Android NDK Version: 21.3.6528147
Gradle Version: 5.6.4
Operating System: Linux