Qt for android: project error cannot run target compiler - android

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

Related

Parse error at "__attribute__" QT Android

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.

Building QT Android app: ..i686-linux-android-g++: No such file or directory

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)

windows 7 ndk in eclipse Indigo throwing not valid win32

I am having a problem I can run ndk outside of eclipse but not from the workspace folder. I get an error of a missing file.
Android NDK: ERROR:jni/Android.mk:QCAR-prebuilt: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that jni/../../../build/lib/armeabi/libQCAR.so exists or that its path is correct
/cygdrive/c/Users/ALEXDEV/android-ndk-r8b/build/core/prebuilt-library.mk:43: *** Android NDK: Aborting . Stop.
I am wondering if when I create the android project one of the files isnt copied. But when I run it inside eclipse
I get this error. I followed this tutorial
http://mobilepearls.com/labs/ndk-builder-in-eclipse/
The error I got when running ndk in eclipse was as follows
"C:\Users\ALEXDEV\android-ndk-r8b\ndk-build" (in directory "C:\Users\ALEXDEV\workspace\Image"): CreateProcess error=193, %1 is not a valid Win32 application
What do you suggest that I did wrong and what method do you propose will fix this problem.
I am using Eclipse Java EE IDE for Web Developers.
Version: Indigo Service Release 2
I am following this tutorial
http://tools.android.com/recent/usingthendkplugin
I am using this upload
Indigo - http://download.eclipse.org/releases/indigo
Instead of dowloading a package from the link I chose the option add but I used archieve.
Packages can be downloaded straight from eclipse. Here is the link that I used to download
the package http://www.eclipse.org/cdt/downloads.php
I then download this version of the ndk
I got the ndk examples working so the problem is solved.
With ndk r8b, you don't need cygwin at all. Set the build command as ndk-build.cmd
Note that your tutorial is outdated. The recent versions of ADT plugin allow you to simply click "add native support" to a Java project.

NDK Automatic build in eclipse OSX Invoking autoreconf in build directory:

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.

eclipse opencv android ndk: The project was not built due to "'NUL' is an invalid name on this platform."

I'm trying to build and run the 'Tutorial 2 Advanced - 1. Add Native OpenCV' tutorial built into the opencv package for android. I wasn't able to use the ndk-build from eclipse following the tutorial from http://opencv.itseez.com/trunk/doc/tutorials/introduction/android_binary_package/android_binary_package.html
But, I built the project from cygwin successfully. But then when trying to run as an android application in Eclipse, it has the error
'Description Resource Path Location Type
The project was not built due to "'NUL' is an invalid name on this platform.". Fix the problem, then try refreshing this project and building it since it may be inconsistent Tutorial 2 Advanced - 1. Add Native OpenCV Unknown Java Problem'
Any help would be much appreciated, thanks
What exactly did you build with Cygwin? I've had an error which prevented me from building from the command prompt but with Cygwin everything works fine.
In Cygwin I first navigate to my project folder:
cd /cygdrive/c/"path to your project folder>"/
then while I'm in the project folder type:
/cygdrive/c/"path to android-ndk-r7b folder"/ndk-build
After using these commands I was able to run the Tutorial 2 Advanced - 1. Add Native OpenCV project. Let me know if this helps you?

Categories

Resources