I have a problem, about an error when running compiling Android 6.2 - 6.3. As shown below,
this error mostly because you have 2 compiler path. that's mean you have installed mingW separately and with Qt installation. as you can see in your error codes Qt run the moc from this mingW path(C:\Qt\6.3.1...) and then it try to compile the app from other mingW compiler path(C:/MingW/...)
the solution is to remove the other mingW (that you install separately) from your variable path completely or just simply change the name of the other mingW folder to some thing else like mingWX that the Qt can not found it.
Related
I compile for the first time "toutchinteraction.pro" from Qt for android examples.
I installed sdk manager from android studio, all my android setup are well configured except for openssls which is optional (I didn't install it).
When I open the example project from Qt creator, I have the following error: Project ERROR: Cannot run target compiler 'C:\Program Files (x86)\Android\android-sdk\ndk\21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++
Do you think that the white space inside the path makes this issue?
I can confirm you that it is the whitespace, I had the same issue, tried everything, and in the end installing the SDK and NDK in a path without whitespace solved the problem
I am building the first application in QT Creator, and came to the step I don't understand.
I have Mac, Android Studio is installed, Android SDK and NDK are installed using Studio. PATH to $ANDROID_NDK_ROOT is set manually.
My application compiles for Desktop without problems but trying to compile it for Android gives me this error:
/bin/sh: /Users/drob/Library/Android/sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/darwin-x86_64/bin/i686-linux-android-g++: No such file or directory
/bin/sh: /Users/drob/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++: No such file or directory
/bin/sh: /Users/drob/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++: No such file or directory
Project ERROR: Cannot run target compiler '/Users/drob/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++'. Output:
===================
/bin/sh: /Users/drob/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++: No such file or directory
===================
Maybe you forgot to setup the environment?
Error while parsing file /Users/drob/OneDrive/DEVEL/PROJECTS/QT_Projects/btchat/btchat.pro. Giving up.
I found that I should do the following steps, but I am scared to completely crash the system:
1. Install G++ (but what is this and how to install it on Mac properly)
2. Create G++ toolchain using NDK script (unfortunately too complicated for me. Some guide will be welcome)
What I also found out is that normally QT for Mac uses Clang compiler from XCode that I also have got installed. Should I somehow make QT Creator use that compiler instead of G++?
Sorry for questions that might sound silly but I am really lost at that point
Using the trial and error method I found that it is practically impossible to make NDK r10e work with QT 5.9. I ended up installing latest NDK and latest QT (5.12.6)
I am trying to build by C++ library for Android on Windows 8.1 using NDK android-ndk-r10e. The library builds totally fine on Linux, but I can't get it working on Windows.
I am always getting this error:
/usr/bin/sh: C:android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++: No such file or directory
As you can see, Qt Creator displays path to g++ as C:android-ndk-r10e while it is actually C:\android-ndk-r10e. I tried to manually edit Makefile, but it seems to re-create it every time, so my changes got discarded.
I this a known issue? How can I work around it?
(Qt version 5.4.2, Qt Creator 3.6.0)
Beware of other MinGW installations; Qt Creator installs its own MinGW, and you should use this one for Qt.
I am running openSUSE 12.2 64-bit trying to compile an app in Necessitas alpha 4.1. It's a basic app and the code is likely not the issue. Through the course of tracing the issue I made sure to have all dependencies and tools.jar, which can apparently cause similar errors. When compiling I get:
Packaging Error: Command '/usr/bin/ant clean debug' failed.Exit code: 1
File not found:
No file is actually listed. I copy/pasted this line from Projects->Build Steps->qmake:
/home/mark/Software/necessitas/Android/Qt/482/armeabi-v7a/bin/qmake /home/mark/Dev/qt/myProject/myProject.pro -r -spec android-g++ CONFIG+=debug CONFIG+=declarative_debug
Then I pasted in a terminal window and the result is:
sh: /home/mark/necessitas/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: No such file or directory
This is obviously incorrect as my path is ~/Software/necessitas not ~/necessitas. I have checked through every tab of Tools->Options but see nowhere that references the incorrect folder. Any clue where this is supposed to go?
I had this exact error last night. However I noticed that the Google documentation specifically said java-6-openjdk. So I installed the older JDK using synaptic and then ran:
sudo update-alternatives --config java
I selected the version 6 and re-ran the process. Which completed successfully.
(To be fair I was using Qt 5.1 beta 1 and freshly downloaded NDK and SDK's, ant was 1.8.1 from the repositories)
Were you able to resolve your problem in the mean time ?
This has to do with the Java environment variables, more precisely with JAVA_HOME.
Did you install OpenJDK right before you tried to launch your app ?
I am not certain where OpenJDK installs in OpenSUSE, but on my ArchLinux the variable had to be set to :
JAVA_HOME=/usr/lib/jvm/java-7-openjdk
in order for QtCreator to compile the project properly.
In my case, I had Oracle's JDK installed, so right after installing OpenJDK, loging out and reloging updated my environment variables as wished.
There is also a similar post to yours:
How to build my HelloWorld Android application with Necessitas (qt port)?
And you'll find a good necessitas starter video here :
http://youtu.be/suPeZ7XC1xk
this time with a droid related question.
Im running Eclipse Helios and Mac OS X 10.6.8
I have been following a book and a few tutorials on building the NDK from both command line and Eclipse.
I am copying the source over there is no static library business. I can compile from the command line fine with the "ndk-build" executable and it works fine.
Though i need to compile inside Eclipse for the reasons i don't need to go into here.
Ive tried 2 techniques and the one i have seen working is to convert my Project to a c++ project and then in Project / Properties / c/c++ Build tab / Build Command i set to ndk-build , this is set to be visible in my path (hence why it compiles when i go to directory and use ndk-build from Terminal)
I then in the C/C++ General tab add the following locations as include directories :
/Users/Me/Code/Android/android-ndk-r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/include
/Users/me/Code/Android/android-ndk-r7b/platforms/android-9/arch-arm/usr/include
/Users/me/Code/Android/android-ndk-r7b/sources/android/native_app_glue
Then when i go to compile i don't get any out put i just get the following error:
Invoking autoreconf in build directory: /Users/me/Code/Android/DroidBlaster
sh -c autoreconf -i
autoreconf: `configure.ac' or `configure.in' is required
Configuration failed with error
Ive tried a few other tutorials but to no avail, if i could award a bounty on this is would as its urgent i get this fixed.
Cheers community :)
NOTE:
Ive worked out that it is using auto tools to build the project where this is incorrect as i should be building with the NDK , getting closer to an answer hopefully. Seems that i cant convert my Android project with CDT to a custom build configuration, might be a bug to do with Eclipse, trying a fresh install
Ok so i worked it out, it was because i was trying to compile using Auto tools when i should have set up the project when i should have been using "Convert to C/C++ project" didn't help though that eclipse installed CDT incorrectly and i had to reinstall to get the right plugins.