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. [SOLVED]Qt 5.1 for Android issue when running app on device(Can't find necessary libs)
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]Qt 5.1 for Android issue when running app on device(Can't find necessary libs)

Scheduled Pinned Locked Moved Mobile and Embedded
11 Posts 4 Posters 8.2k Views 1 Watching
  • 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.
  • O Offline
    O Offline
    onurozcelik
    wrote on last edited by
    #1

    I installed latest Android-SDK, NDK and Ant.
    I downloaded three Android apis(10,17,18)
    I developed a simple qt app for android

    Below is my deployment tries

    First I tried to deploy api level 10 emulator(app deploys but shows a blank screen )
    Second I tried to deploy api level 17 emulator(app deploys and runs smoothly)
    Third I tried to deploy api level 10 device running android 2.3.6(app deploys but shows blank screen)

    On my third try application output shows:

    E/Qt (14265): Can't create main activity
    E/Qt (14265): java.io.FileNotFoundException: /data/data/org.qtproject.example.sampleapp/lib/lib--Managed_by_Qt_Creator--plugins_platforms_android_libqtforandroid.so (No such file or directory)
    E/Qt (14265): at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)
    E/Qt (14265): at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:232)
    E/Qt (14265): at java.io.FileInputStream.<init>(FileInputStream.java:80)
    E/Qt (14265): at java.io.FileInputStream.<init>(FileInputStream.java:132)
    E/Qt (14265): at org.qtproject.qt5.android.bindings.QtActivity.createBundledBinary(QtActivity.java:366)
    E/Qt (14265): at org.qtproject.qt5.android.bindings.QtActivity.extractBundledPluginsAndImports(QtActivity.java:386)
    E/Qt (14265): at org.qtproject.qt5.android.bindings.QtActivity.startApp(QtActivity.java:436)

    What is problem? How can I solve it?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      TioRoy
      wrote on last edited by
      #2

      I guess Qt is compiling using armeabi-v7a for API10 (and API10 need to be armeabi).

      In apk file, it deploy a dir /lib/armeabi-v7a (that contains .so files). So API10 doesn't load this dir.

      Did you try to check the option "Install Ministro" instead of "Use Qt libraries from device" or "Deploy local Qt libraries"?

      1 Reply Last reply
      0
      • O Offline
        O Offline
        onurozcelik
        wrote on last edited by
        #3

        I installed Ministro and Ministro Config Tool from Google Play. When I run application "Use local Qt libs" option unchecked Ministro detecs there are missing libraries. But In my every try I got "Invalid Qt version" error with Ministro(I am using Qt 5.1 for Android(32-bit) on Windows 7 x64)

        I also tried "Deploy local Qt libraries" option. But my phone internal memory is low. So the app can't run with low memory(I also changed app install location to external)

        If I copy necessary *.so files to SD card manually and set app LIBS path. Does it work?

        1 Reply Last reply
        0
        • G Offline
          G Offline
          gomiflo
          wrote on last edited by
          #4

          I've got the same issue.

          Qt 5.1 does not come with armv5 binaries, so it's not going to package the right libs for armv5 processors.

          I tried to build my own, but eventually ran into all the problems related to this:
          https://bugreports.qt-project.org/browse/QTBUG-31338?

          Long story short, if you want to make an apk for an ARMv5 device, you need Qt binaries built for it. They would be in the /lib/armeabi directory. However, as described in the bug report, it isn't possible to build a set of binaries that will work from the code currently in the repository.

          I did see a post somewhere where someone claimed to have built them successfully. Maybe we can chase down how that was achieved.

          1 Reply Last reply
          0
          • O Offline
            O Offline
            onurozcelik
            wrote on last edited by
            #5

            So I guess we have to buy a new device running higher api level or we have to update our phone with Android 4.x(unofficial solutions)

            1 Reply Last reply
            0
            • M Offline
              M Offline
              Moster
              wrote on last edited by
              #6

              What is your device?

              If it is below armv7, updating to android 4.x also wont help.

              1 Reply Last reply
              0
              • O Offline
                O Offline
                onurozcelik
                wrote on last edited by
                #7

                My device is Samsung Galaxy Ace running Android 2.3.6 version.

                "Device specs":http://www.gsmarena.com/samsung_galaxy_ace_s5830-3724.php

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  Moster
                  wrote on last edited by
                  #8

                  https://groups.google.com/forum/#!topic/android-qt/wliNaQnOPyI
                  Check out what marco scarpetta said in his 2nd last post, maybe it works for you.

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    gomiflo
                    wrote on last edited by
                    #9

                    The bug has now been marked fixed. Does anyone know how to view the changeset? I'd like to see what was done before building.

                    Edit: Looks like the release config has been fixed for the 4.4.3 toolchain ( https://bugreports.qt-project.org/browse/QTBUG-32854 ). Still, I'd like to see the changeset.

                    1 Reply Last reply
                    0
                    • O Offline
                      O Offline
                      onurozcelik
                      wrote on last edited by
                      #10

                      Above post is very promising.

                      I downloaded legacy toolchains for linux-x86 from "here":http://developer.android.com/tools/sdk/ndk/index.html
                      and extracted contents of the archieve under <path-to-ndk>/toolchains

                      I tried to configure qt with
                      @./configure -android-arch armeabi -android-toolchain-version 4.3.3 -android-ndk-host linux-x86 -developer-build -xplatform android-g++ -nomake tests -nomake examples -android-ndk /home/onurozcelik/Android/android-ndk-r9/ -android-sdk /home/onurozcelik/Android/android-sdk-linux/ -skip qttools -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples@

                      But it alwasys fails with the error-message:
                      Can not detect Android NDK toolchain. Please use -android-toolchain-version to specify

                      What is the problem?

                      1 Reply Last reply
                      0
                      • O Offline
                        O Offline
                        onurozcelik
                        wrote on last edited by
                        #11

                        I figured out the problem

                        In configure script I wrote

                        @-android-toolchain-version 4.3.3@

                        instead of

                        @-android-toolchain-version 4.4.3@

                        I successfully built Qt 5 for Android armeabi libs and tested a simple app. The app worked.

                        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