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. Build QtMultimedia for android on windows
Forum Updated to NodeBB v4.3 + New Features

Build QtMultimedia for android on windows

Scheduled Pinned Locked Moved Mobile and Embedded
10 Posts 4 Posters 4.8k 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.
  • A Offline
    A Offline
    allanba
    wrote on last edited by
    #1

    Hello,

    I managed to configure Qt with a few minor difficulties and compile QtBase, QtDeclarative, QtQuick1 but when I get to QtMultimedia I keep getting "ERROR: QtMultimedia requires android API 11", I passed in the configure line -android-ndk-platform android-14 with the hope that it would solve my problem, in the end it didn't.

    I followed the instructions in the page "Building under cmd":http://qt-project.org/wiki/building_qt-android_on_windows and downloaded the recomended ndk and sdk with the platforms 10,11 and 14.

    Has anybody experienced such behaviour?

    Cheers.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Munawwar
      wrote on last edited by
      #2

      I get the same on ubuntu. I followed the "wiki link":http://qt-project.org/wiki/Qt5ForAndroidBuilding, but didn't work.
      Here is another link that guides through the build process - "link":http://stackoverflow.com/questions/16313314/how-to-build-qt5-for-android. But that didn't help too.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        allanba
        wrote on last edited by
        #3

        Thank you for replying, I remember back when Qt 5.1 alpha was released, if I'm not wrong that was in the middle of April I managed to cross-compile Qt for android under windows 7 and had the same problem as now, but the fix was easy I modified the java.pri in mkspecs/features to use android-14 instead of the default, android-9. I didn't get any errors but the previously mentioned, now I am getting some errors related to xkbcommons which were solved by compiling the library and adding the includes and lib to the correspoinding toolchains in the android ndk. But still I can't manage to build QtMultimedia. I guess I am wating for the next relase and also for any updates to the wiki page.

        I've also noticed differences between the building for Linux/Mac and building for windows pages. There are several notes regarding what to do and what not to do in Linux but are skipped in the windows section.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Munawwar
          wrote on last edited by
          #4

          I filed a "bug on Qt bug tracker":https://bugreports.qt-project.org/browse/QTBUG-31157 for this. I also posted a workaround there (removing the API 11 check from qtmultimedia.pro) which seems to have built QtMultimedia without errors, but I am yet to see whether everything works correctly.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SimonL
            wrote on last edited by
            #5

            I just created a post http://qt-project.org/forums/viewthread/27838/ about issues with XKBCommon it would be nice if you could post there how you compiled it with the ndk thats where im stuck

            1 Reply Last reply
            0
            • A Offline
              A Offline
              allanba
              wrote on last edited by
              #6

              @Munawwar I tried as well to remove the test line in QtMultimedia.pro but the compilation would fail after a few seconds. Also if I was to go directly to the config.tests/android/ directory and build the test there, it would work with no problem.

              @SimonL what I did was basically to install virtualbox, build the library under ubuntu and then copy the result to the Mingw's include and lib directories, that seems to have solved the issue. What seems to be the best is to install linux in your development machine and do all the compling and deploying to android there. The last time the windows wiki page was updated was I think a week after the release of Qt5.1.0 and since then no more updates, there were however several changes in the linux/mac page which leads me to think that buidling under linux is being given more attention than building under windows.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                Munawwar
                wrote on last edited by
                #7

                @allanba: My issue was solved by deleting the entire repo and starting all over. I don't know why things were going wrong the first time.

                You probably could do something similar:
                git clean -fdx .;git checkout -- .;
                git submodules foreach --recursive "git clean -fdx .;git checkout -- .;"
                perl init-repository -f
                git checkout stable

                Then configure and make again.

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  allanba
                  wrote on last edited by
                  #8

                  @Munawwar I'll have to wait until I go to a big city to do that. I live in the southern part of patagonia and a good and stable connection is not precisely affordable here.

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    dexter256
                    wrote on last edited by
                    #9

                    There are two problems causing this;

                    1. qtmultimedia/config.tests/android is failing because dx.bat is not locating the dx.jar file in the android-sdk. I had to change it (dx.bat) to look in android-sdk\build-tools\17.0.0.\lib
                      Failure to create android.jar causes qtmultimedia.pro to fail on qtCompileTest(android). This all happens early in the build.
                    2. If you're part way through the build, fixing the above won't help unless you remove 'CONFIG += done_config_android' from .qmake.cache. This will force a recheck for android.jar.
                      You have to modify mkspecs\features\configure.prf and change the references from 'make' to 'mingw32-make' (if you're using mingw).
                      You may also then be faced with another problem;
                      Remove the stderr redirection to /dev/null (if your cross-compiling) in mkspecs\features\ctest_testcase.prf. The test doesn't correctly identify that your using Win32, so it uses the Unix notation.
                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      allanba
                      wrote on last edited by
                      #10

                      @dexter256 I already find it, I have a not so new sdk so dx is still under platform-tools, it was the second case. Thanks anyway.

                      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