Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Deploy external static libs (.a) to apk
Qt 6.11 is out! See what's new in the release blog

Deploy external static libs (.a) to apk

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
8 Posts 3 Posters 650 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.
  • M Offline
    M Offline
    marvic
    wrote on last edited by marvic
    #1

    App compiled and built with static libraries (.a) Android settings armv7, Qt creator created apk file, but did not include .a libs. How to deploy .a with apk.
    This is pro entries, did not worked.

    ANDROID_PACKAGE_SOURCE_DIR = $$PWD/thirdParty/libs/static-libs
    
    #android {
    #    QT += androidextras
    #    ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-build
    #    ANDROID_EXTRA_LIBS += $$PWD/thirdParty/libs/static-libs/api.a \
    #                          $$PWD/thirdParty/libs/static-libs/store.a    \
    #                          $$PWD/thirdParty/libs/static-libs/store1.a \
    #                          $$PWD/thirdParty/libs/static-libs/libtinycbor.a \
    #    OTHER_FILES += android-build/AndroidManifest.xml
    #}
    
    
    JoeCFDJ 1 Reply Last reply
    0
    • M marvic

      App compiled and built with static libraries (.a) Android settings armv7, Qt creator created apk file, but did not include .a libs. How to deploy .a with apk.
      This is pro entries, did not worked.

      ANDROID_PACKAGE_SOURCE_DIR = $$PWD/thirdParty/libs/static-libs
      
      #android {
      #    QT += androidextras
      #    ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-build
      #    ANDROID_EXTRA_LIBS += $$PWD/thirdParty/libs/static-libs/api.a \
      #                          $$PWD/thirdParty/libs/static-libs/store.a    \
      #                          $$PWD/thirdParty/libs/static-libs/store1.a \
      #                          $$PWD/thirdParty/libs/static-libs/libtinycbor.a \
      #    OTHER_FILES += android-build/AndroidManifest.xml
      #}
      
      
      JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by
      #2

      @marvic .a is a static lib and linked to your app. It is included in your app. No need to deploy it.

      M 1 Reply Last reply
      1
      • JoeCFDJ JoeCFD

        @marvic .a is a static lib and linked to your app. It is included in your app. No need to deploy it.

        M Offline
        M Offline
        marvic
        wrote on last edited by marvic
        #3

        @JoeCFD said in Deploy external static libs (.a) to apk:

        @marvic .a is a static lib and linked to your app. It is included in your app. No need to deploy it.

        It is not included, as app is not running . And when apk is open in android studio, in libs folder .a files not appear in apk.

        JoeCFDJ jsulmJ 2 Replies Last reply
        0
        • M marvic

          @JoeCFD said in Deploy external static libs (.a) to apk:

          @marvic .a is a static lib and linked to your app. It is included in your app. No need to deploy it.

          It is not included, as app is not running . And when apk is open in android studio, in libs folder .a files not appear in apk.

          JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by JoeCFD
          #4

          @marvic It may be some other reasons. You can not find .a there since static lib is built into your app. You can find only .so in lib folder.
          https://www.learncpp.com/cpp-tutorial/a1-static-and-dynamic-libraries/

          1 Reply Last reply
          1
          • M marvic

            @JoeCFD said in Deploy external static libs (.a) to apk:

            @marvic .a is a static lib and linked to your app. It is included in your app. No need to deploy it.

            It is not included, as app is not running . And when apk is open in android studio, in libs folder .a files not appear in apk.

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @marvic said in Deploy external static libs (.a) to apk:

            It is not included, as app is not running

            Static libs ARE put into executables - that is the whole point of static libs!
            If your app is not working then please tell us what exactly is not working.

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

            M 1 Reply Last reply
            0
            • jsulmJ jsulm

              @marvic said in Deploy external static libs (.a) to apk:

              It is not included, as app is not running

              Static libs ARE put into executables - that is the whole point of static libs!
              If your app is not working then please tell us what exactly is not working.

              M Offline
              M Offline
              marvic
              wrote on last edited by marvic
              #6

              @jsulm said in Deploy external static libs (.a) to apk:

              @marvic said in Deploy external static libs (.a) to apk:

              It is not included, as app is not running

              Static libs ARE put into executables - that is the whole point of static libs!
              If your app is not working then please tell us what exactly is not working.

              Trying to run Qt qml app on android emulator (x86) debug, It compiled and created, The moment it flashes and stops app, means died, Error in Application output says
              "org.qtproject.examples.one." died.
              Qt5.14.2, NDK 20, 21
              Android build sdk is 28, tried with 29 20 32 33 same result,
              avd Api 30, 28
              created x86 images, target selected Android 9, 10 Google

              When I try to run Qt examples like clock, it works fine.

              jsulmJ 1 Reply Last reply
              0
              • M marvic

                @jsulm said in Deploy external static libs (.a) to apk:

                @marvic said in Deploy external static libs (.a) to apk:

                It is not included, as app is not running

                Static libs ARE put into executables - that is the whole point of static libs!
                If your app is not working then please tell us what exactly is not working.

                Trying to run Qt qml app on android emulator (x86) debug, It compiled and created, The moment it flashes and stops app, means died, Error in Application output says
                "org.qtproject.examples.one." died.
                Qt5.14.2, NDK 20, 21
                Android build sdk is 28, tried with 29 20 32 33 same result,
                avd Api 30, 28
                created x86 images, target selected Android 9, 10 Google

                When I try to run Qt examples like clock, it works fine.

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @marvic Please run with debugger, maybe you will get more useful information to identify the issue.

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

                M 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @marvic Please run with debugger, maybe you will get more useful information to identify the issue.

                  M Offline
                  M Offline
                  marvic
                  wrote on last edited by marvic
                  #8

                  @jsulm said in Deploy external static libs (.a) to apk:

                  @marvic Please run with debugger, maybe you will get more useful information to identify the issue.

                  Same app works fine on desktop qt creator emulator, but on phone and on (avd) emulator, it just displays empty screen.

                  1 Reply Last reply
                  0

                  • Login

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