[SOLVED] Qt 5.1.1 - Android : configuring Qt Creator
-
Hello everyone,
I chose to post my problem cause I'm really stuck configuring QT Creator for Android.
I'm working on Windows 7 64 bits, and I used "this tutorial":http://gennon.wordpress.com/2013/06/23/deploy-qt-to-android/ to help me in the process (and sorry for bad english, and french logs, I'm French).I have installed :
- JDK from "this link":http://download.oracle.com/otn-pub/java/jdk/7u45-b18/jdk-7u45-windows-x64.exe
- Android ADT Bundle (sdk+eclipse) from "this link":http://developer.android.com/sdk/index.html#win-bundle
- Android NDK from "this link":http://dl.google.com/android/ndk/android-ndk-r9b-windows-x86_64.zip
- Apache Ant from "this link":http://wwwftp.ciril.fr/pub/apache//ant/binaries/apache-ant-1.9.2-bin.zip
- QT 5.1.1 & QT creator 2.8.1 from "this link":http://download.qt-project.org/official_releases/online_installers/1.4/qt-windows-opensource-1.4.0-2-x86-online.exe
I created the JAVA_HOME environment variable : C:\Program Files\Java\jdk1.7.0_45
I downloaded all the things from the SDK Manager.
I added in the Path environment variable :- The JDK bin directory : C:\Program Files\Java\jdk1.7.0_45\bin;
- The Android SDK tools and platform-tools directories : C:\Android\sdk\tools;C:\Android\sdk\platform-tools;
At this step I restarted my computer.
I tested Android SDK Manager from Eclipse : all was Ok (I was able to start an AVD and my devices were visible).
I started Qt Creator and went in Settings>Android and configured "like this":https://lh4.googleusercontent.com/-7YkdCokrpF8/UnuqzVqKrNI/AAAAAAAADL4/l3z5UgmjBxI/w958-h581-no/Config_QtCreator_Android.png
I restarted my computer once again, and created a new project (graphic application) and selected the "android for arm (GCC 4.8, Qt 5.1.1) kit.
I then modified the ui by adding a pushbutton.
Then i tried to compile and run my test app (in release mode):
- on windows : ok;
- on android : the AVD is launched, but my app encounters an error while compiling :
Compilation output :
@
16:11:59: Exécution des étapes pour le projet sans_titre2...
16:11:59: Débute : "C:\Qt\5.1.0\android_armv7\bin\qmake.exe" C:\Qt\Tools\QtCreator\bin\sans_titre2\sans_titre2.pro -r -spec android-g++
16:12:00: Le processus "C:\Qt\5.1.0\android_armv7\bin\qmake.exe" s'est terminé normalement.
16:12:00: Débute : "mingw32-make"
qtcreator_ctrlc_stub: Command line failed: mingw32-make
16:12:00: Le processus "mingw32-make" s'est terminé avec le code -1.
Erreur lors de la compilation/déploiement du projet sans_titre2 (kit : Android for arm (GCC 4.8, Qt 5.1.1))
Lors de l'exécution de l'étape "Make"
16:12:00: Elapsed time: 00:01.@And in the general messages :
@Could not read qmake configuration file C:/Qt/5.1.0/android_armv7/mkspecs/android-g++/qmake.conf.
Could not read qmake configuration file C:/Qt/5.1.1/android_armv7/mkspecs/android-g++/qmake.conf.
Could not read qmake configuration file C:/Qt/5.1.0/android_x86/mkspecs/android-g++/qmake.conf.
Could not read qmake configuration file C:/Qt/5.1.1/android_x86/mkspecs/android-g++/qmake.conf.@In the project panel, it seems that qt creator is unable to find mingw32-make :
@Make : mingw32-make non trouvé dans l'environnement.@So I put the one from : C:\Qt\Tools\mingw48_32\bin\mingw32-make.exe
Then i retried to compile and run and got :
@:-1: erreur : Erreur de paquetage : la commande "C:/Android/ant/apache-ant-1.9.2/bin/ant.bat clean debug" a échoué.Code de sortie : 1@So obviously I think I have a problem with Ant.
The only things I did with ant were :- Download it,
- Unzip it,
- Put it in C:\Android\Ant
Am I missing something ? Please someone help me, it's been 2 days since my first tries... Thanks in advance !
-
I finally did it ! What I've done to resolve my problem :
- I completed Ant installation as explained "here":http://ant.apache.org/manual/install.html
- I corrected JAVA_HOME by suppressing the last ""
- I restarted my computer
- In my project run settings I changed the Android version (I put it to android-16, as my device run with Android 4.1.2)
And it works :)
But now when I go in Qt Creator settings, it keeps crashing... never mind now it is configured ^^