Qt for android build failure (install_target error 129) - android

I'm tring to build the Qt Quick Demo - Calqlatr bundled with Qt for an android device w/ armeabi-v7 but i get a
[install_target] Error 129
looking at the detailed output it shows
[...]
14:48:09: The process "C:\Qtwdroid\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
14:48:09: Starting: "C:\Qtwdroid\Tools\mingw530_32\bin\mingw32-make.exe" "INSTALL_ROOT=C:/Qtwdroid/Examples/Qt-5.7/quick/demos/build-calqlatr-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_0-Release/android-build" install
0 [main] sh 2744 sync_with_child: child 6128(0x1A8) died before initialization with status code 0xC0000142
26 [main] sh 2744 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable
Makefile:588: recipe for target 'install_target' failed
mingw32-make: *** [install_target] Error 129
14:48:11: The process "C:\Qtwdroid\Tools\mingw530_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project calqlatr (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.7.0))
When executing step "Copy application data"
14:48:11: Elapsed time: 00:11.
i did followed these steps on the Qt Docs http://doc.qt.io/qt-5/androidgs.html the only difference is that i have jdk 1.8-102
The makefile is avaible in pastebin here: http://pastebin.com/rYyisieu
i did not find this error on the internet, i'm really lost
im new to the subject,
Thanks.

Related

QT Android App stdlib.h: No such file or directory

I am trying to develop a Android App using QT/QML.
I am using QT 5.9.1, downloaded from https://download.qt.io/archive/qt/5.9/5.9.1/, while installing i checked Android option also.
Downloaded Android SDK - sdk-tools-linux-3859397.zip and Android NDK - android-ndk-r16b-linux-x86_64.zip
Added both on QTCreator>Tools>Options>Devices
When compiling the program i am getting the following error.
../../Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/cstdlib:72:20: fatal error: stdlib.h: No such file or directory
#include <stdlib.h>
^
compilation terminated.
Makefile:992: recipe for target 'main.o' failed
make: *** [main.o] Error 1
12:10:38: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project HellotestAndr (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.9.1 for Android armv7))
When executing step "Make"
How can i fix this error?

Setup Qt environment for android development

I've heard a lot about Qt so I wanted to give it a try. Unfortunately I ran into a problem at the start..
First of all I set up the environment according to the offical qt guide: http://doc.qt.io/qt-5/androidgs.html
When I trying to build the "cellphone" example which is found on the Welcome page, I'm getting this error which helps me nearly nothing:
:-1: error: [qrc_cellphone.cpp] Error 1
This is the compile output:
20:23:41: Running steps for project cellphone...
20:23:41: Configuration unchanged, skipping qmake step.
20:23:41: Starting: "/usr/bin/make"
/opt/Qt/5.6/android_armv7/bin/rcc -name cellphone ../cellphone/cellphone.qrc -o qrc_cellphone.cpp
RCC: Error in '../cellphone/cellphone.qrc': Cannot find file '../../3rdparty/three.js'
Makefile:509: recipe for target 'qrc_cellphone.cpp' failed
make: *** [qrc_cellphone.cpp] Error 1
20:23:42: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project cellphone (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.6.0))
When executing step "Make"
20:23:42: Elapsed time: 00:00.
When I trying to create and build Qt Quick application I'm getting these two errors:
:-1: error: cannot find -lGL
:-1: error: collect2: error: ld returned 1 exit status
For this one the compile output:
20:26:01: Running steps for project QtQuickTest...
20:26:01: Configuration unchanged, skipping qmake step.
20:26:01: Starting: "/usr/bin/make"
g++ -Wl,-z,origin -Wl,-rpath,\$ORIGIN -Wl,-rpath,/opt/Qt/5.6/gcc_64/lib -o QtQuickTest main.o qrc_qml.o -L/opt/Qt/5.6/gcc_64/lib -lQt5Quick -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lGL -lpthread
/usr/bin/ld: cannot find -lGL
Makefile:198: recipe for target 'QtQuickTest' failed
collect2: error: ld returned 1 exit status
make: *** [QtQuickTest] Error 1
20:26:01: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project QtQuickTest (kit: Desktop Qt 5.6.0 GCC 64bit)
When executing step "Make"
20:26:01: Elapsed time: 00:00.
My os is kubuntu if it matters. What did I miss?
Thanks in advance!
Edit after user12345's answer:
Now at least the Quick project works for desktop. But I'm getting this error message when I'm trying to build for android:
BUILD FAILED
/home/nandor/Programs/android-sdk-linux/tools/ant/build.xml:649: The following error occurred while executing this line:
/home/nandor/Programs/android-sdk-linux/tools/ant/build.xml:694: null returned: 1
Total time: 0 seconds
Building the android package failed!
-- For more information, run this command with --verbose.
16:28:36: The process "/opt/Qt/5.6/android_armv7/bin/androiddeployqt" exited with code 14.
Error while building/deploying project QtQuickTest (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.6.0))
When executing step "Build Android APK"
However the cellphone built in example still giving the same error message. I don't know where should I get or find that ../../3rdparty/three.js file and why this isn't included in the project. Anyway I guess it's not related to the main question I guess however I'm happy if you can answer. :)
Edit 2:
These are the 648-650 lines in the build.xml:
<do-only-if-manifest-hasCode
elseText="hasCode = false. Skipping aidl/renderscript/R.java">
<echo level="info">Handling aidl files...</echo>
And 694:
proguardFile="${out.absolute.dir}/proguard.txt">
I feel we need to go step by step and try to resolve the errors that you are observing. I see that you are using the Qt 5.6.0, I will suggest you to update your Mesa Package on your Ubuntu machine by executing the below command:
sudo apt-get install libgl1-mesa-dev
This should resolve the sort of errors like below that you are observing:
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
The process "/usr/bin/make" exited with code 2.
After that try to clean and rebuild the desktop version, and see what you find.
Coming to your Android Build error:
My Guess will be that you might have set build settings of your android kit wrongly. I will suggest you to change the Android build SDK to android-23 as shown in the attached picture below:

Failing to build a simple hello world apk

I am running Windows 8.1 trying to start cocos2d-x. I've got version 3.4 on the system and every time I try building the hello world app the following shows up:
No rule to make target d:/android-ndk/sources/android/cpufeatures/cpu-features.c', needed by obj/local/armeabi/objs-debug/cpufeatures/cpu-features.o`
Waiting for unfinished jobs....
StaticLibrary : libcocos2dandroid.a
make: Leaving directory C:/android/cocos2d-x-3.4/NEW_PROJECTS_DIR/MyGame/proj.android
Ndk build failed
C:\android\cocos2d-x-3.4\NEW_PROJECTS_DIR\MyGame>`
I am using the ndk r9 for this and it's located at c:/android/adt/ndk.
I've tried ndk r10d as well but it brings up the following error instead:
collect2.exe: error: ld returned 1 exit status
make: *** [obj/local/armeabi/libcocos2dcpp.so] Error 1
make: Leaving directory `C:/android/cocos2d-x-3.4/tutorialV3CPPWindows/proj.andr
oid'
Ndk build failed
But I think that the problem is with the ndk. I am quite new to this and have been using tutorials and guides, so detail would be appreciated.
If you use eclipse,check your NDK_ROOT path
the error info
No rule to make target d:/android-ndk/sources/android/cpufeatures/cpu-features.c'
but your ndk r9 is atc:/android/adt/ndk
They are not the same.

I cannot compile an Android app with Qt

I'm so confused. I cannot compile an apk app. This is what I've done:
Installed Qt with this image (I know it's rather old, I will update
it soon):
qt-windows-opensource-5.1.1-android-x86-win32-offline.exe
Downloaded Android SDK and NDK and added in Options > Android
Now there is a weird warning and no apk output:
Qt versions for architectures mips, arm, x86 are missing. To add the
Qt versions, select Options > Build & Run >Qt versions.
And this is the Build & Run page:
Update:
I followed these steps and the build process finished. But some errors appeared :
http://doc.qt.io/qtcreator/creator-mobile-app-tutorial.html
10:47:21: Running steps for project Quick_test...
10:47:21: Configuration unchanged, skipping qmake step.
10:47:21: Starting: "C:\Qt\Qt5.3.0\Tools\mingw482_32\bin\mingw32-make.exe"
mingw32-make: Nothing to be done for 'first'.
10:47:24: The process "C:\Qt\Qt5.3.0\Tools\mingw482_32\bin\mingw32-make.exe" exited normally.
10:47:24: Starting: "C:\Qt\Qt5.3.0\Tools\mingw482_32\bin\mingw32-make.exe" INSTALL_ROOT="C:\Users\rosta\Documents\Qt Projects\build-Quick_test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_3_0-Release\android-build" install
The system cannot find the path specified.
The system cannot find the path specified.
Makefile:773: recipe for target 'install_target' failed
mingw32-make: *** [install_target] Error 1
10:47:27: The process "C:\Qt\Qt5.3.0\Tools\mingw482_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project Quick_test (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.3.0))
When executing step 'Copy application data'
10:47:27: Elapsed time: ۰:۰۰:۰۶.

necessitas - can't compile any project

I just installed necessitas on ubuntu 13.04 , on the package qtcreator , then i tried to compile the simplest project i could, which is a project just created, and even trying different AVDs with different APIs nothing changes.
It returns:
:-1: error: [install_target] Error 1 (ignored)
and
:-1: error: Can't copy gdbserver from '/home/federico/necessitas/android-ndk/prebuilt/android-arm/gdbserver/gdbserver' to '/home/federico/Android Projects/Hello-World/android/libs/armeabi/gdbserver'
Hope that this can help other people, because I didn't find anything on the web that really could help me.
Here is the compile output:
11:26:52: Running steps for project Hello-World...
11:26:52: Configuration unchanged, skipping qmake step.
11:26:52: Starting: "/usr/bin/make"
make: Nothing to be done for `first'.
11:26:52: The process "/usr/bin/make" exited normally.
11:26:52: Starting: "/usr/bin/make" 'INSTALL_ROOT=/home/federico/Android Projects/Hello-World/android' install
/bin/sh: 1: test: /home/federico/Android: unexpected operator
install -m 755 -p "libHello-World.so" "/home/federico/Android Projects/Hello-World/android/libs/armeabi/libHello-World.so"
install: cannot create regular file '/home/federico/Android Projects/Hello-World/android/libs/armeabi/libHello-World.so': No such file or directory
make: [install_target] Error 1 (ignored)
11:26:52: The process "/usr/bin/make" exited normally.
11:26:52: Copy Qt app & libs to Android package ...
Can't copy gdbserver from '/home/federico/necessitas/android-ndk/prebuilt/android-arm/gdbserver/gdbserver' to '/home/federico/Android Projects/Hello-World/android/libs/armeabi/gdbserver'
Error while building/deploying project Hello-World (kit: Android for arm (GCC 4.6, Qt 4.8.2))
When executing step 'Packaging for Android'
11:26:52: Elapsed time: 00:00.

Categories

Resources