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

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?

Related

Unable to deploy on Android with QT

I am trying to use QT to develop android apps. I am using Ubuntu 17.10 and my kit is
qt-opensource-linux-x64-android-5.7.1
NDK is android-ndk-r10e-linux-x86_64
SDK is from android-studio-ide-171.4443003-linux
I am able to build a sample code but trying to deploy I get the following error marked in bold
Generating Android Package
Input file: /home/prajosh/Project/cpp_study/test_1/build-test_1-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-libtest_1.so-deployment-settings.json
Output directory: /home/prajosh/Project/cpp_study/test_1/build-test_1-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build/
Application binary: /home/prajosh/Project/cpp_study/test_1/build-test_1-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/libtest_1.so
Android build platform: android-27
**Install to device: No
Cannot find template directory /home/prajosh/Android/Sdk/tools/templates/gradle/wrapper
20:27:26: The process "/home/prajosh/Android/Qt5.7.1/5.7/android_armv7/bin/androiddeployqt" exited with code 3.
Error while building/deploying project test_1 (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.7.1))
When executing step "Build Android APK"**
20:27:26: Elapsed time: 00:00.
Tried installing gradle but gives me an error
**java: symbol lookup error: /usr/lib/jni/libnative-platform-curses.so: undefined symbol: tgetent**
Could not get a correct solution after searches. Could anyone kindly, please point me the mistake?

Linphone-android compilation error

I am compiling linphone for android.i have set ndk and sdk paths.and installed pre-requisites.i also have 32-bit libs in my ubuntu12.04-64-bits.But when i 'make' the source code.it gives me 'sqlite.3h' file not found.
it is my log
In file included from
jni/..//submodules/linphone/build/android/../../coreapi/account_creator.c:21:0:
jni/..//submodules/linphone/build/android/../../coreapi/private.h:55:21: fatal error: sqlite3.h: No such file or directory
#include "sqlite3.h"
^
compilation terminated.
make[1]: *** [obj/local/armeabi-v7a/objs/linphone/account_creator.o] Error 1
I successfully able to compile linphone-android on ubuntu 12.04lts 64-bits.Problem solved by downloading arm-2009q3(consists of arm libraries and executables)and export its bin path in bash file(i.e. export PATH=$PATH:/usr/local/arm-2009q3/bin).

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: ۰:۰۰:۰۶.

Android SREC_JNI compilation error

I am trying to compile SREC_JNI code in Eclipse (Windows 7), I got the code from here https://github.com/arthurv/srec
I am getting the following error
C:\android-ndk-r8c\ndk-build.cmd all
"Compile++ thumb : srec_jni <= android_speech_srec_MicrophoneInputStream.cpp
jni/srec_jni/android_speech_srec_MicrophoneInputStream.cpp:26:23: fatal error: utils/Log.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs/srec_jni/android_speech_srec_MicrophoneInputStream.o] Error 1
**** Build Finished ****
I would like to know where the utils folder is located and how to compile this SREC code.
This project is a fork of a component of Android OS. It should be built from the Android system tree and not with NDK as a standalone project.
You can find
utils/Log in platform/frameworks/native repository:
git clone https://android.googlesource.com/platform/frameworks/native

opencv.hpp not found in NDK build on Windows

I am getting some issues here while I am trying to compile my code with Cgywin.
$ /cygdrive/c/native_work/android-ndk-r8b/ndk-build
Android NDK: WARNING: Unsupported source file extensions in jni/Android.mk for module main
Android NDK: NotePaperDetector.hpp
Install : libmain.so => libs/armeabi-v7a/libmain.so
so how I can compile the .hpp file ?
Now as #mah you said I have removed it from my Android.mk but now its showing some different error -
$ /cygdrive/c/native_work/android-ndk-r8b/ndk-build
Compile++ thumb : main <= NotePaperDetector.cpp
In file included from jni/NotePaperDetector.hpp:4:0,
from jni/NotePaperDetector.cpp:1:
jni/NoteLocation.hpp:4:30: fatal error: opencv2/opencv.hpp: No such file or directory
compilation terminated.
/cygdrive/c/native_work/android-ndk-r8b/build/core/build-binary.mk:255: recipe for target `obj/local/armeabi-v7a/objs/main/NotePaperDetector.o' failed
make: *** [obj/local/armeabi-v7a/objs/main/NotePaperDetector.o] Error 1
With the latest NDK releases you don't need Cygwin at all.
By the way a GNU/Linux platform is always the best for Android developers.

Categories

Resources