Sqlite Android Qt drivers error



  • Hi,

    Is there any way can create sqlite database through qt commands in Android.

    Below is the error log

    Starting remote process.I art : Late-enabling -Xcheck:jni
    W System : ClassLoader referenced unknown path:
    I QtCore : Start
    W linker : /data/app/org.qtproject.example.splinechart-1/lib/arm/libQt5Gui.so: unsupported flags DT_FLAGS_1=0x81
    W linker : /data/app/org.qtproject.example.splinechart-1/lib/arm/libQt5Widgets.so: unsupported flags DT_FLAGS_1=0x81
    W linker : /data/app/org.qtproject.example.splinechart-1/lib/arm/libQt5Charts.so: unsupported flags DT_FLAGS_1=0x81
    W linker : /data/app/org.qtproject.example.splinechart-1/lib/arm/libQt5AndroidExtras.so: unsupported flags DT_FLAGS_1=0x81
    W linker : /data/app/org.qtproject.example.splinechart-1/lib/arm/libQt5Bluetooth.so: unsupported flags DT_FLAGS_1=0x81
    W linker : /data/app/org.qtproject.example.splinechart-1/lib/arm/libQt5Sql.so: unsupported flags DT_FLAGS_1=0x81
    W linker : /data/data/org.qtproject.example.splinechart/qt-reserved-files/plugins/platforms/android/libqtforandroid.so: unsupported flags DT_FLAGS_1=0x81
    I Qt : qt start
    I art : Do partial code cache collection, code=11KB, data=27KB
    I art : After code cache collection, code=11KB, data=27KB
    I art : Increasing code cache capacity to 128KB
    W linker : /data/app/org.qtproject.example.splinechart-1/lib/arm/libsplinechart.so: unused DT entry: type 0xf arg 0x739a
    W : (null):0 ((null)): QSqlDatabase: QSQLITE driver not loaded
    W : (null):0 ((null)): QSqlDatabase: available drivers:
    W : (null):0 ((null)): QSqlDatabase: an instance of QCoreApplication is required for loading driver plugins
    D : ../splinechart/devicedata.cpp:55 (DeviceData::DeviceData(QObject*)): Error: connection with database fail
    W : (null):0 ((null)): QSqlDatabase: QSQLITE driver not loaded


  • Moderators

    @Avtansh-Sharma It looks like you did not deploy SQLite driver together with your app. Try to set QT_DEBUG_PLUGINS variable before starting your app, you then will see more information about what is missing.



  • 17:25:43: Running steps for project splinechart...
    17:25:43: Configuration unchanged, skipping qmake step.
    17:25:43: Starting: "/usr/bin/make"
    make: Nothing to be done for 'first'.
    17:25:43: The process "/usr/bin/make" exited normally.
    17:25:43: Removing directory /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/assets
    17:25:43: Removing directory /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/libs
    17:25:43: Starting: "/usr/bin/make" INSTALL_ROOT=/home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build install
    /home/user/Qt5.9.0/5.9/android_armv7/bin/qmake -install qinstall program libsplinechart.so /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/libs/armeabi-v7a/libsplinechart.so
    17:25:44: The process "/usr/bin/make" exited normally.
    17:25:44: Starting: "/home/user/Qt5.9.0/5.9/android_armv7/bin/androiddeployqt" --input /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-libsplinechart.so-deployment-settings.json --output /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build --deployment bundled --android-platform android-22 --jdk /home/user/Downloads/jdk1.8.0_131 --verbose --gradle
    Generating Android Package
    Input file: /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-libsplinechart.so-deployment-settings.json
    Output directory: /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/
    Application binary: /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/libsplinechart.so
    Android build platform: android-22
    Install to device: No
    Delete missing files /home/user/Qt5.9.0/5.9/android_armv7/src/android/templates/res /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/res
    Delete missing files /home/user/Qt5.9.0/5.9/android_armv7/src/android/templates/res/values /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/res/values
    Copying Android package template.
    -- Skipping file /home/user/Qt5.9.0/5.9/android_armv7/src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.jar. Same or newer file already in place.
    -- Skipping file /home/user/Qt5.9.0/5.9/android_armv7/src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.properties. Same or newer file already in place.
    -- Skipping file /home/user/Qt5.9.0/5.9/android_armv7/src/3rdparty/gradle/gradlew. Same or newer file already in place.
    -- Skipping file /home/user/Qt5.9.0/5.9/android_armv7/src/3rdparty/gradle/gradlew.bat. Same or newer file already in place.
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/AndroidManifest.xml
    -- Skipping file /home/user/Qt5.9.0/5.9/android_armv7/src/android/templates/build.gradle. Same or newer file already in place.
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/res/values/libs.xml
    Detecting dependencies of application.
    Reading dependencies from /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/libsplinechart.so
    lib/libQt5Charts.so
    lib/libQt5Widgets.so
    lib/libQt5Gui.so
    lib/libQt5Bluetooth.so
    lib/libQt5Sql.so
    lib/libQt5Core.so
    Reading dependencies from /home/user/Qt5.9.0/5.9/android_armv7/lib/libQt5Charts.so
    lib/libQt5Widgets.so
    lib/libQt5Gui.so
    lib/libQt5Core.so
    Reading dependencies from /home/user/Qt5.9.0/5.9/android_armv7/lib/libQt5Widgets.so
    lib/libQt5Gui.so
    lib/libQt5Core.so
    Reading dependencies from /home/user/Qt5.9.0/5.9/android_armv7/lib/libQt5Gui.so
    lib/libQt5Core.so
    Reading dependencies from /home/user/Qt5.9.0/5.9/android_armv7/lib/libQt5Core.so
    Appending dependency: lib/libQt5Core.so
    Reading Android dependencies for Qt5Core
    Appending dependency: lib/libQt5Gui.so
    Reading Android dependencies for Qt5Gui
    Appending dependency from xml: plugins/platforms/android/libqtforandroid.so
    Appending dependency from xml: plugins/iconengines/libqsvgicon.so
    Appending dependency from xml: plugins/imageformats/libqgif.so
    Appending dependency from xml: plugins/imageformats/libqicns.so
    Appending dependency from xml: plugins/imageformats/libqico.so
    Appending dependency from xml: plugins/imageformats/libqjpeg.so
    Appending dependency from xml: plugins/imageformats/libqsvg.so
    Appending dependency from xml: plugins/imageformats/libqtga.so
    Appending dependency from xml: plugins/imageformats/libqtiff.so
    Appending dependency from xml: plugins/imageformats/libqwbmp.so
    Appending dependency from xml: plugins/imageformats/libqwebp.so
    Appending dependency: lib/libQt5Widgets.so
    Reading Android dependencies for Qt5Widgets
    Appending dependency: lib/libQt5Charts.so
    Reading dependencies from /home/user/Qt5.9.0/5.9/android_armv7/lib/libQt5Bluetooth.so
    lib/libQt5Core.so
    lib/libQt5AndroidExtras.so
    Reading dependencies from /home/user/Qt5.9.0/5.9/android_armv7/lib/libQt5AndroidExtras.so
    lib/libQt5Core.so
    Appending dependency: lib/libQt5AndroidExtras.so
    No android dependencies for Qt5AndroidExtras
    Appending dependency: lib/libQt5Bluetooth.so
    Reading dependencies from /home/user/Qt5.9.0/5.9/android_armv7/lib/libQt5Sql.so
    lib/libQt5Core.so
    Appending dependency: lib/libQt5Sql.so
    No android dependencies for Qt5Charts
    Reading Android dependencies for Qt5Bluetooth
    Reading Android dependencies for Qt5Sql
    Appending dependency from xml: plugins/sqldrivers/libqsqlite.so
    Reading dependencies from /home/user/Qt5.9.0/5.9/android_armv7/plugins/platforms/android/libqtforandroid.so
    lib/libQt5Gui.so
    lib/libQt5Core.so
    Reading dependencies from /home/user/Qt5.9.0/5.9/android_armv7/plugins/platforms/android/libqtforandroid.so
    lib/libQt5Gui.so
    lib/libQt5Core.so
    Scanning for QML imports.
    Copying GNU STL library
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libgnustl_shared.so
    Copying 21 dependencies from Qt into package.
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libQt5Core.so
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/QtAndroid-bundled.jar
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libQt5Gui.so
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libplugins_platforms_android_libqtforandroid.so
    -- Skipping /home/user/Qt5.9.0/5.9/android_armv7/plugins/iconengines/libqsvgicon.so. It has unmet dependencies: lib/libQt5Svg.so.
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libplugins_imageformats_libqgif.so
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libplugins_imageformats_libqicns.so
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libplugins_imageformats_libqico.so
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libplugins_imageformats_libqjpeg.so
    -- Skipping /home/user/Qt5.9.0/5.9/android_armv7/plugins/imageformats/libqsvg.so. It has unmet dependencies: lib/libQt5Svg.so.
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libplugins_imageformats_libqtga.so
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libplugins_imageformats_libqtiff.so
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libplugins_imageformats_libqwbmp.so
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libplugins_imageformats_libqwebp.so
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libQt5Widgets.so
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libQt5Charts.so
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libQt5AndroidExtras.so
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libQt5Bluetooth.so
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libQt5Sql.so
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/QtAndroidBluetooth-bundled.jar
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libplugins_sqldrivers_libqsqlite.so
    Checking if application binary is in package.
    Copying gdbserver into package.
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/gdbserver
    -- Copied /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//libs/armeabi-v7a/libgdbserver.so
    Stripping libraries to minimize size.
    Updating Android package files with project settings.
    -- res/values/libs.xml
    -- AndroidManifest.xml
    Pregenerating entry list for assets file engine.
    Initialized native services in: /home/user/.gradle/native
    Creating new cache for fileHashes, path /home/user/.gradle/caches/3.4/fileHashes/fileHashes.bin, access org.gradle.cache.internal.DefaultCacheAccess@7c214cc0
    Creating new cache for plugin-use-metadata, path /home/user/.gradle/caches/3.4/plugin-resolution/plugin-use-metadata.bin, access org.gradle.cache.internal.DefaultCacheAccess@25bfcafd
    Creating new cache for client-status, path /home/user/.gradle/caches/3.4/plugin-resolution/client-status.bin, access org.gradle.cache.internal.DefaultCacheAccess@25bfcafd
    Starting Build
    Settings evaluated using settings file '/master/settings.gradle'.
    Projects loaded. Root project using build file '/home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/build.gradle'.
    Included projects: [root project 'android-build']
    Evaluating root project 'android-build' using build file '/home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/build.gradle'.
    Creating new cache for metadata-2.23/module-metadata, path /home/user/.gradle/caches/modules-2/metadata-2.23/module-metadata.bin, access org.gradle.cache.internal.DefaultCacheAccess@612e21b9
    Creating new cache for metadata-2.23/artifact-at-repository, path /home/user/.gradle/caches/modules-2/metadata-2.23/artifact-at-repository.bin, access org.gradle.cache.internal.DefaultCacheAccess@612e21b9
    Using 4 worker leases.
    Creating configuration compile
    Creating configuration apk
    Creating configuration provided
    Creating configuration wearApp
    Creating configuration annotationProcessor
    Creating configuration androidTestCompile
    Creating configuration androidTestApk
    Creating configuration androidTestProvided
    Creating configuration androidTestWearApp
    Creating configuration androidTestAnnotationProcessor
    Creating configuration testCompile
    Creating configuration testApk
    Creating configuration testProvided
    Creating configuration testWearApp
    Creating configuration testAnnotationProcessor
    Creating configuration debugCompile
    Creating configuration debugApk
    Creating configuration debugProvided
    Creating configuration debugWearApp
    Creating configuration debugAnnotationProcessor
    Creating configuration testDebugCompile
    Creating configuration testDebugApk
    Creating configuration testDebugProvided
    Creating configuration testDebugWearApp
    Creating configuration testDebugAnnotationProcessor
    Creating configuration releaseCompile
    Creating configuration releaseApk
    Creating configuration releaseProvided
    Creating configuration releaseWearApp
    Creating configuration releaseAnnotationProcessor
    Creating configuration testReleaseCompile
    Creating configuration testReleaseApk
    Creating configuration testReleaseProvided
    Creating configuration testReleaseWearApp
    Creating configuration testReleaseAnnotationProcessor
    Parsing the SDK, no caching allowed
    Parsing /home/user/Downloads/AndroidSdk/build-tools/26.0.0/package.xml
    Parsing /home/user/Downloads/AndroidSdk/platform-tools/package.xml
    Parsing /home/user/Downloads/AndroidSdk/platforms/android-22/package.xml
    Parsing /home/user/Downloads/AndroidSdk/platforms/android-23/package.xml
    Parsing /home/user/Downloads/AndroidSdk/platforms/android-24/package.xml
    Parsing /home/user/Downloads/AndroidSdk/platforms/android-25/package.xml
    Parsing /home/user/Downloads/AndroidSdk/platforms/android-26/package.xml
    Parsing /home/user/Downloads/AndroidSdk/tools/package.xml
    Parsing /home/user/Downloads/AndroidSdk/build-tools/26.0.0/package.xml
    Parsing /home/user/Downloads/AndroidSdk/platform-tools/package.xml
    Parsing /home/user/Downloads/AndroidSdk/platforms/android-22/package.xml
    Parsing /home/user/Downloads/AndroidSdk/platforms/android-23/package.xml
    Parsing /home/user/Downloads/AndroidSdk/platforms/android-24/package.xml
    Parsing /home/user/Downloads/AndroidSdk/platforms/android-25/package.xml
    Parsing /home/user/Downloads/AndroidSdk/platforms/android-26/package.xml
    Parsing /home/user/Downloads/AndroidSdk/tools/package.xml
    The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
    Using incremental javac compilation.
    Not using incremental javac compilation.
    The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
    Using incremental javac compilation.
    Not using incremental javac compilation.
    Not using incremental javac compilation.
    All projects evaluated.
    Selected primary task 'assembleDebug' from project :
    Creating new cache for fileHashes, path /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/.gradle/3.4/taskHistory/fileHashes.bin, access org.gradle.cache.internal.DefaultCacheAccess@2c2aab92
    Creating new cache for annotation-processors, path /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/.gradle/3.4/fileContent/annotation-processors.bin, access org.gradle.cache.internal.DefaultCacheAccess@7573c7b5
    Tasks to be executed: [task ':preBuild', task ':preDebugBuild', task ':checkDebugManifest', task ':prepareDebugDependencies', task ':compileDebugAidl', task ':compileDebugRenderscript', task ':generateDebugBuildConfig', task ':generateDebugResValues', task ':generateDebugResources', task ':mergeDebugResources', task ':processDebugManifest', task ':processDebugResources', task ':generateDebugSources', task ':incrementalDebugJavaCompilationSafeguard', task ':compileDebugJavaWithJavac', task ':compileDebugNdk', task ':compileDebugSources', task ':mergeDebugShaders', task ':compileDebugShaders', task ':generateDebugAssets', task ':mergeDebugAssets', task ':transformClassesWithDexForDebug', task ':mergeDebugJniLibFolders', task ':transformNative_libsWithMergeJniLibsForDebug', task ':processDebugJavaRes', task ':transformResourcesWithMergeJavaResForDebug', task ':validateSigningDebug', task ':packageDebug', task ':assembleDebug']
    Creating new cache for jvmClassSignatures, path /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/.gradle/3.4/taskHistory/jvmClassSignatures.bin, access org.gradle.cache.internal.DefaultCacheAccess@2c2aab92
    Creating new cache for fileSnapshots, path /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/.gradle/3.4/taskHistory/fileSnapshots.bin, access org.gradle.cache.internal.DefaultCacheAccess@2c2aab92
    Creating new cache for taskHistory, path /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/.gradle/3.4/taskHistory/taskHistory.bin, access org.gradle.cache.internal.DefaultCacheAccess@2c2aab92
    :preBuild (Thread[main,5,main]) started.
    :preBuild
    Skipping task ':preBuild' as it has no actions.
    :preBuild UP-TO-DATE
    :preBuild (Thread[main,5,main]) completed. Took 0.021 secs.
    :preDebugBuild (Thread[main,5,main]) started.
    :preDebugBuild
    Skipping task ':preDebugBuild' as it has no actions.
    :preDebugBuild UP-TO-DATE
    :preDebugBuild (Thread[main,5,main]) completed. Took 0.001 secs.
    :checkDebugManifest (Thread[main,5,main]) started.
    :checkDebugManifest
    Putting task artifact state for task ':checkDebugManifest' into context took 0.001 secs.
    Executing task ':checkDebugManifest' (up-to-date check took 0.0 secs) due to:
    Task has not declared any outputs.
    :checkDebugManifest (Thread[main,5,main]) completed. Took 0.004 secs.
    :prepareDebugDependencies (Thread[main,5,main]) started.
    :prepareDebugDependencies
    Putting task artifact state for task ':prepareDebugDependencies' into context took 0.0 secs.
    Executing task ':prepareDebugDependencies' (up-to-date check took 0.0 secs) due to:
    Task has not declared any outputs.
    :prepareDebugDependencies (Thread[main,5,main]) completed. Took 0.002 secs.
    :compileDebugAidl (Thread[main,5,main]) started.
    :compileDebugAidl
    Putting task artifact state for task ':compileDebugAidl' into context took 0.022 secs.
    Task :compileDebugAidl class loader hash: a0499cbeba26109b195ac965bbe1e21d
    Task :compileDebugAidl actions class loader hash: e7c2457542b1c563028e7c8e5bda47f9
    Skipping task ':compileDebugAidl' as it is up-to-date (took 0.041 secs).
    :compileDebugAidl UP-TO-DATE
    :compileDebugAidl (Thread[main,5,main]) completed. Took 0.065 secs.
    :compileDebugRenderscript (Thread[main,5,main]) started.
    :compileDebugRenderscript
    Putting task artifact state for task ':compileDebugRenderscript' into context took 0.01 secs.
    Task :compileDebugRenderscript class loader hash: a0499cbeba26109b195ac965bbe1e21d
    Task :compileDebugRenderscript actions class loader hash: e7c2457542b1c563028e7c8e5bda47f9
    Skipping task ':compileDebugRenderscript' as it is up-to-date (took 0.012 secs).
    :compileDebugRenderscript UP-TO-DATE
    :compileDebugRenderscript (Thread[main,5,main]) completed. Took 0.027 secs.
    :generateDebugBuildConfig (Thread[main,5,main]) started.
    :generateDebugBuildConfig
    Putting task artifact state for task ':generateDebugBuildConfig' into context took 0.003 secs.
    Task :generateDebugBuildConfig class loader hash: a0499cbeba26109b195ac965bbe1e21d
    Task :generateDebugBuildConfig actions class loader hash: e7c2457542b1c563028e7c8e5bda47f9
    Skipping task ':generateDebugBuildConfig' as it is up-to-date (took 0.003 secs).
    :generateDebugBuildConfig UP-TO-DATE
    :generateDebugBuildConfig (Thread[main,5,main]) completed. Took 0.008 secs.
    :generateDebugResValues (Thread[main,5,main]) started.
    :generateDebugResValues
    Putting task artifact state for task ':generateDebugResValues' into context took 0.0 secs.
    Task :generateDebugResValues class loader hash: a0499cbeba26109b195ac965bbe1e21d
    Task :generateDebugResValues actions class loader hash: e7c2457542b1c563028e7c8e5bda47f9
    Skipping task ':generateDebugResValues' as it is up-to-date (took 0.003 secs).
    :generateDebugResValues UP-TO-DATE
    :generateDebugResValues (Thread[main,5,main]) completed. Took 0.005 secs.
    :generateDebugResources (Thread[main,5,main]) started.
    :generateDebugResources
    Skipping task ':generateDebugResources' as it has no actions.
    :generateDebugResources UP-TO-DATE
    :generateDebugResources (Thread[main,5,main]) completed. Took 0.001 secs.
    :mergeDebugResources (Thread[main,5,main]) started.
    :mergeDebugResources
    Putting task artifact state for task ':mergeDebugResources' into context took 0.002 secs.
    Task :mergeDebugResources class loader hash: a0499cbeba26109b195ac965bbe1e21d
    Task :mergeDebugResources actions class loader hash: e7c2457542b1c563028e7c8e5bda47f9
    Skipping task ':mergeDebugResources' as it is up-to-date (took 0.065 secs).
    :mergeDebugResources UP-TO-DATE
    :mergeDebugResources (Thread[main,5,main]) completed. Took 0.069 secs.
    :processDebugManifest (Thread[main,5,main]) started.
    :processDebugManifest
    Putting task artifact state for task ':processDebugManifest' into context took 0.001 secs.
    Task :processDebugManifest class loader hash: a0499cbeba26109b195ac965bbe1e21d
    Task :processDebugManifest actions class loader hash: e7c2457542b1c563028e7c8e5bda47f9
    Skipping task ':processDebugManifest' as it is up-to-date (took 0.004 secs).
    :processDebugManifest UP-TO-DATE
    :processDebugManifest (Thread[main,5,main]) completed. Took 0.012 secs.
    :processDebugResources (Thread[main,5,main]) started.
    :processDebugResources
    Putting task artifact state for task ':processDebugResources' into context took 0.003 secs.
    Task :processDebugResources class loader hash: a0499cbeba26109b195ac965bbe1e21d
    Task :processDebugResources actions class loader hash: e7c2457542b1c563028e7c8e5bda47f9
    Skipping task ':processDebugResources' as it is up-to-date (took 0.006 secs).
    :processDebugResources UP-TO-DATE
    :processDebugResources (Thread[main,5,main]) completed. Took 0.01 secs.
    :generateDebugSources (Thread[main,5,main]) started.
    :generateDebugSources
    Skipping task ':generateDebugSources' as it has no actions.
    :generateDebugSources UP-TO-DATE
    :generateDebugSources (Thread[main,5,main]) completed. Took 0.001 secs.
    :incrementalDebugJavaCompilationSafeguard (Thread[main,5,main]) started.
    :incrementalDebugJavaCompilationSafeguard
    Putting task artifact state for task ':incrementalDebugJavaCompilationSafeguard' into context took 0.0 secs.
    Task :incrementalDebugJavaCompilationSafeguard class loader hash: a0499cbeba26109b195ac965bbe1e21d
    Task :incrementalDebugJavaCompilationSafeguard actions class loader hash: e7c2457542b1c563028e7c8e5bda47f9
    Skipping task ':incrementalDebugJavaCompilationSafeguard' as it is up-to-date (took 0.002 secs).
    :incrementalDebugJavaCompilationSafeguard UP-TO-DATE
    :incrementalDebugJavaCompilationSafeguard (Thread[main,5,main]) completed. Took 0.004 secs.
    :compileDebugJavaWithJavac (Thread[main,5,main]) started.
    :compileDebugJavaWithJavac
    Putting task artifact state for task ':compileDebugJavaWithJavac' into context took 0.002 secs.
    Task :compileDebugJavaWithJavac class loader hash: a0499cbeba26109b195ac965bbe1e21d
    Task :compileDebugJavaWithJavac actions class loader hash: 7f22aa878479725b3a3df2c1e32a33f7
    file or directory '/home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/src', not found
    file or directory '/home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/java', not found
    file or directory '/home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build/src/debug/java', not found
    Skipping task ':compileDebugJavaWithJavac' as it is up-to-date (took 0.061 secs).
    :compileDebugJavaWithJavac UP-TO-DATE
    :compileDebugJavaWithJavac (Thread[main,5,main]) completed. Took 0.073 secs.
    :compileDebugNdk (Thread[main,5,main]) started.
    :compileDebugNdk
    Putting task artifact state for task ':compileDebugNdk' into context took 0.0 secs.
    Skipping task ':compileDebugNdk' as it has no source files and no previous output files.
    :compileDebugNdk NO-SOURCE
    :compileDebugNdk (Thread[main,5,main]) completed. Took 0.002 secs.
    :compileDebugSources (Thread[main,5,main]) started.
    :compileDebugSources
    Skipping task ':compileDebugSources' as it has no actions.
    :compileDebugSources UP-TO-DATE
    :compileDebugSources (Thread[main,5,main]) completed. Took 0.0 secs.
    :mergeDebugShaders (Thread[main,5,main]) started.
    :mergeDebugShaders
    Putting task artifact state for task ':mergeDebugShaders' into context took 0.0 secs.
    Task :mergeDebugShaders class loader hash: a0499cbeba26109b195ac965bbe1e21d
    Task :mergeDebugShaders actions class loader hash: e7c2457542b1c563028e7c8e5bda47f9
    Skipping task ':mergeDebugShaders' as it is up-to-date (took 0.003 secs).
    :mergeDebugShaders UP-TO-DATE
    :mergeDebugShaders (Thread[main,5,main]) completed. Took 0.004 secs.
    :compileDebugShaders (Thread[main,5,main]) started.
    :compileDebugShaders
    Putting task artifact state for task ':compileDebugShaders' into context took 0.005 secs.
    Task :compileDebugShaders class loader hash: a0499cbeba26109b195ac965bbe1e21d
    Task :compileDebugShaders actions class loader hash: e7c2457542b1c563028e7c8e5bda47f9
    Skipping task ':compileDebugShaders' as it is up-to-date (took 0.002 secs).
    :compileDebugShaders UP-TO-DATE
    :compileDebugShaders (Thread[main,5,main]) completed. Took 0.009 secs.
    :generateDebugAssets (Thread[main,5,main]) started.
    :generateDebugAssets
    Skipping task ':generateDebugAssets' as it has no actions.
    :generateDebugAssets UP-TO-DATE
    :generateDebugAssets (Thread[main,5,main]) completed. Took 0.001 secs.
    :mergeDebugAssets (Thread[main,5,main]) started.
    :mergeDebugAssets
    Putting task artifact state for task ':mergeDebugAssets' into context took 0.026 secs.
    Task :mergeDebugAssets class loader hash: a0499cbeba26109b195ac965bbe1e21d
    Task :mergeDebugAssets actions class loader hash: e7c2457542b1c563028e7c8e5bda47f9
    Skipping task ':mergeDebugAssets' as it is up-to-date (took 0.017 secs).
    :mergeDebugAssets UP-TO-DATE
    :mergeDebugAssets (Thread[main,5,main]) completed. Took 0.047 secs.
    :transformClassesWithDexForDebug (Thread[main,5,main]) started.
    :transformClassesWithDexForDebug
    Putting task artifact state for task ':transformClassesWithDexForDebug' into context took 0.006 secs.
    Task :transformClassesWithDexForDebug class loader hash: a0499cbeba26109b195ac965bbe1e21d
    Task :transformClassesWithDexForDebug actions class loader hash: e7c2457542b1c563028e7c8e5bda47f9
    Skipping task ':transformClassesWithDexForDebug' as it is up-to-date (took 0.014 secs).
    :transformClassesWithDexForDebug UP-TO-DATE
    :transformClassesWithDexForDebug (Thread[main,5,main]) completed. Took 0.021 secs.
    :mergeDebugJniLibFolders (Thread[main,5,main]) started.
    :mergeDebugJniLibFolders
    Putting task artifact state for task ':mergeDebugJniLibFolders' into context took 0.001 secs.
    Task :mergeDebugJniLibFolders class loader hash: a0499cbeba26109b195ac965bbe1e21d
    Task :mergeDebugJniLibFolders actions class loader hash: e7c2457542b1c563028e7c8e5bda47f9
    Skipping task ':mergeDebugJniLibFolders' as it is up-to-date (took 0.097 secs).
    :mergeDebugJniLibFolders UP-TO-DATE
    :mergeDebugJniLibFolders (Thread[main,5,main]) completed. Took 0.1 secs.
    :transformNative_libsWithMergeJniLibsForDebug (Thread[main,5,main]) started.
    :transformNative_libsWithMergeJniLibsForDebug
    Putting task artifact state for task ':transformNative_libsWithMergeJniLibsForDebug' into context took 0.002 secs.
    Task :transformNative_libsWithMergeJniLibsForDebug class loader hash: a0499cbeba26109b195ac965bbe1e21d
    Task :transformNative_libsWithMergeJniLibsForDebug actions class loader hash: e7c2457542b1c563028e7c8e5bda47f9
    Skipping task ':transformNative_libsWithMergeJniLibsForDebug' as it is up-to-date (took 0.016 secs).
    :transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
    :transformNative_libsWithMergeJniLibsForDebug (Thread[main,5,main]) completed. Took 0.027 secs.
    :processDebugJavaRes (Thread[main,5,main]) started.
    :processDebugJavaRes
    Putting task artifact state for task ':processDebugJavaRes' into context took 0.0 secs.
    Skipping task ':processDebugJavaRes' as it has no source files and no previous output files.
    :processDebugJavaRes NO-SOURCE
    :processDebugJavaRes (Thread[main,5,main]) completed. Took 0.002 secs.
    :transformResourcesWithMergeJavaResForDebug (Thread[main,5,main]) started.
    :transformResourcesWithMergeJavaResForDebug
    Putting task artifact state for task ':transformResourcesWithMergeJavaResForDebug' into context took 0.001 secs.
    Task :transformResourcesWithMergeJavaResForDebug class loader hash: a0499cbeba26109b195ac965bbe1e21d
    Task :transformResourcesWithMergeJavaResForDebug actions class loader hash: e7c2457542b1c563028e7c8e5bda47f9
    Skipping task ':transformResourcesWithMergeJavaResForDebug' as it is up-to-date (took 0.004 secs).
    :transformResourcesWithMergeJavaResForDebug UP-TO-DATE
    :transformResourcesWithMergeJavaResForDebug (Thread[main,5,main]) completed. Took 0.007 secs.
    :validateSigningDebug (Thread[main,5,main]) started.
    :validateSigningDebug
    Putting task artifact state for task ':validateSigningDebug' into context took 0.0 secs.
    Executing task ':validateSigningDebug' (up-to-date check took 0.0 secs) due to:
    Task has not declared any outputs.
    :validateSigningDebug (Thread[main,5,main]) completed. Took 0.001 secs.
    :packageDebug (Thread[main,5,main]) started.
    :packageDebug
    Putting task artifact state for task ':packageDebug' into context took 0.002 secs.
    Task :packageDebug class loader hash: a0499cbeba26109b195ac965bbe1e21d
    Task :packageDebug actions class loader hash: e7c2457542b1c563028e7c8e5bda47f9
    Skipping task ':packageDebug' as it is up-to-date (took 0.018 secs).
    :packageDebug UP-TO-DATE
    :packageDebug (Thread[main,5,main]) completed. Took 0.039 secs.
    :assembleDebug (Thread[main,5,main]) started.
    :assembleDebug
    Skipping task ':assembleDebug' as it has no actions.
    :assembleDebug UP-TO-DATE
    :assembleDebug (Thread[main,5,main]) completed. Took 0.0 secs.

    BUILD SUCCESSFUL

    Total time: 6.152 secs
    Stopped 0 worker daemon(s).
    Android package built successfully in 6.449 ms.
    -- File: /home/user/Downloads/build-splinechart-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7-Debug/android-build//build/outputs/apk/android-build-debug.apk
    17:25:50: The process "/home/user/Qt5.9.0/5.9/android_armv7/bin/androiddeployqt" exited normally.
    17:25:50: Elapsed time: 00:07.


  • Moderators

    @Avtansh-Sharma "QSqlDatabase: an instance of QCoreApplication is required for loading driver plugins" - do you try to connect to the DB before creating QApplication instance?



  • This post is deleted!


  • Here is the code
    I am using QApplication not QCoreApplication

    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);

    DeviceData obj_DeviceData; ///does the database work
    obj_DeviceData.syncDevice(true);
    
    QMainWindow window;
    ThemeWidget *widget = new ThemeWidget();
    window.setCentralWidget(widget);
    
    window.resize(900, 600);
    window.show();
    return a.exec();
    

    }


  • Moderators

    @Avtansh-Sharma Do you have any static variables which are accessing the database?



  • No there is no static variable



  • @jsulm

    Here is the constructor

    DeviceData::DeviceData(QObject *parent)
    : QObject(parent), m_bluetoothSocket(0)
    {

    try
    {
    m_bterminate=false;
    m_db = QSqlDatabase::addDatabase("QSQLITE");
    
    //m_db.setDatabaseName("/home/user/db_Health.db");
    
    QString basePath = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation)[1];
    m_db.setDatabaseName(basePath+"/db_Health.db");
    if (!m_db.open())
    {
        qDebug() << "Error: connection with database fail";
    
    }
    

    m_db is member variable


  • Moderators

    @Avtansh-Sharma "Ok. I will change that however it worked fine on Ubuntu desktop app. maybe a reinitializition woul have happened in desktop app" - after changing what errors do you get now?



  • Errors is that the sqlite driver is missing on Android

    W : (null):0 ((null)): QSqlDatabase: QSQLITE driver not loaded

    this error still comes. I have tried use QStandardPaths. Still there is an error


  • Moderators

    @Avtansh-Sharma In my first answer I suggested this: "Try to set QT_DEBUG_PLUGINS variable before starting your app, you then will see more information about what is missing."
    Did you try this?
    And please post all error messages not just that one line.



  • @jsulm Please check above in thread . I have posted atleast 200-300 lines of compile and debug inof using debug flag


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.