Build QtMultimedia for android on windows



  • 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.



  • 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.



  • 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.



  • 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.



  • 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



  • @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.



  • @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.



  • @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.



  • 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.


  • @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.


Log in to reply
 

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