[Solved] Qt Creator on OSX10.9 - Developing for Android problems
-
Hi everyone,
A friend of mine and I are creating a very simple calculator app for a computer science project. I built it for desktop using Qt creator and it was suggested that we port it to Android. I began by following the instructions found here: http://qt-project.org/wiki/Qt5ForAndroidBuilding to the best of my abilities. I created a very basic project (I didn't add any code at all) and tried to build.
The first Error I got was: "You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK." It didn't stop any building, but I was loathe to just have it sit there so I tried to figure out the problem. From my projects: ANDROID_NDK_ROOT is set to "/Users/jonathanburns/android-ndk-r9d" Which I guarantee exists (I checked like 10 times). From the previous tutorial I assumed that all it wanted was the path to the NDK and not any specific files. I also got the error "Could not read qmake configuration file". The qmake was already set for me in Preferences -> Build & Run as "Qt/5.2.1/android_etc"
Next I had a problem building period, none of the Android Virtual Machines were appearing in the list at all. I created some in the SVM and they refused to acknowledge that they were compatible. I fixed that problem via this post: http://qt-project.org/forums/viewthread/40543/ and got it past that stage.
Next came the build errors. The first one was that: "bits/c++config.h was not found" My solution to this was to check to see if I had it anywhere else since the consensus on the internet was that it wasn't looking in the right place . So I went and found the c++config.h from a different folder in the NDK, this might seem silly but I was pretty frustrated at this point. After about 10 more "Cannot find something.h", which I moved over, I got the the error I'm at now:
"error: cannot find -lgnustl_shared"
"main.cpp:10: error: undefined reference to '__cxa_end_cleanup'"
"main.o(.ARM.extab+0x0):-1: error: error: undefined reference to '__gxx_personality_v0'"
And those errors repeated roughly 4 times each.Is there anything obvious I'm doing wrong? I'd appreciate any help at this point.
Thanks :)
-
Hi and welcome to devnet,
If you aren't planning on doing work on Qt itself for android, you should consider installing the prebuilt android package. That might save you some time and get you up and running more quickly. You will still need to install the android dependencies though.
Hope it helps
-
"Here":http://qt-project.org/downloads on the download page
You should consider the online installer if you are going to developer also for iOS so you can select which version of Qt you want.
-
It seems that since I already had the entire Qt installed I'm in the same position I started.
/bin/sh: /opt/android/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc: No such file or directory
Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.
Could not read qmake configuration file /Users/jonathanburns/Qt/5.2.1/android_armv5/mkspecs/android-g++/qmake.conf./bin/sh: /opt/android/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc: No such file or directory
Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.
Could not read qmake configuration file /Users/jonathanburns/Qt/5.2.1/android_armv7/mkspecs/android-g++/qmake.conf./bin/sh: /opt/android/ndk/toolchains/x86-4.8/prebuilt/darwin-x86_64/bin/i686-linux-android-gcc: No such file or directory
Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.
Could not read qmake configuration file /Users/jonathanburns/Qt/5.2.1/android_x86/mkspecs/android-g++/qmake.conf.Is there any particular reason this would occur?
My ANDROID_NDK_ROOT variable is set to /Users/jonathanburns/android-ndk-r9dHere is a ls to prove it exists:
Jonathan-Burnss-MacBook-Pro:~ jonathanburns$ ls /Users/jonathanburns/android-ndk-r9d/
GNUmakefile ndk-gdb-py.cmd
README.TXT ndk-gdb.py
RELEASE.TXT ndk-stack
build ndk-which
docs platforms
documentation.html prebuilt
find-win-host.cmd remove-windows-symlink.sh
ndk-build samples
ndk-build.cmd sources
ndk-depends tests
ndk-gdb toolchains
ndk-gdb-pyAm I missing something?