On 5/15/2015 10:04 PM, Igor Mironchik wrote:
Hi,
I encountered this problem on Windows, but I think that this is the same
problem...
The main problem is that that QtCreator wait 5 seconds for Android SDK for
answer of available supported platforms... Try to close QtCreator, delete
.user file and open and configure project again.
If you computer is slow as my then you will receive correctly configured
project somewhere in third time. Just open .user file and look what
QtCreator wrote about Android platform... If there is android--1 then try
again, if you will see something like android-21 or android-16 then
everything is ok...
Thanks for the help, Igor. I've solved it, but it turns out to be kind of
strange.
First, Creator gave me this output whenever I loaded the project:
/bin/sh: 1:
/opt/android/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc:
not found
Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable
to point to your Android NDK.
Could not read qmake configuration file
/opt/Qt5.4.1/5.4/android_armv7/mkspecs/android-g++/qmake.conf.
Error while parsing file
/opt/Qt5.4.1/Examples/Qt-5.4/quick/demos/stocqt/stocqt.pro. Giving up.
even though the ANDROID_NDK_ROOT variable /is/set in the environment (via the
/etc/bash.bashrc file, so it is global):
ANDROID_NDK_ROOT=/opt/android-ndk-r10e
I noticed that Creator, having completely ignored the variable it was
demanding, was looking for the NDK in some default location
("/opt/android/ndk"). However, when you extract the SDK and the NDK, it
places them into their own distinct folders:
bob@bob-virtual-machine /opt $ l
total 28K
drwxr-xr-x 7 root root 4.0K May 16 12:19 ./
drwxr-xr-x 22 root root 4.0K May 15 14:39 ../
drwxr-xr-x 8 bob bob 4.0K May 15 16:13 Qt5.4.1/
drwxr-xr-x 2 root root 4.0K May 16 07:11 android.bob/
drwxr-xr-x 10 bob bob 4.0K May 5 03:49 *android-ndk-r10e/*
drwxrwxr-x 13 bob bob 4.0K May 15 16:18 *android-sdk-linux/*
...
So, to get around Creator's apparent brain damage, I created the /opt/android
folder, and made symlinks in there to the SDK and NDK:
bob@bob-virtual-machine /opt/android $ l
total 8.0K
drwxr-xr-x 2 bob bob 4.0K May 16 07:11 ./
drwxr-xr-x 7 root root 4.0K May 16 12:24 ../
lrwxrwxrwx 1 bob bob 21 May 16 07:11 *ndk -> /opt/android-ndk-r10e/*
lrwxrwxrwx 1 bob bob 22 May 16 07:11 *sdk -> /opt/android-sdk-linux/*
which has made Creator happy, and I'm not able to build and deploy the
examples to my phone. :)
Perhaps the tutorials need to be updated.
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest