I have installed QT 5.7.1 from the qt-everywhere source tarball on my Ubuntu 14.04 VM. I configured QT with the following incantation:
./configure -nomake tests \
-android-sdk /path/to/sdk \
-android-ndk /path/to/sdk/ndk \
-android-ndk-platform android-19 \
-android-ndk-host linux-x86_64 \
-android-arch armeabi-v7a
After that succeeded I did:
make
sudo make install
I have a project that has this specified:
QT += androidextras
When I build it (using qmake && make) I am getting the following error:
Project ERROR: Unknown module(s) in QT: androidextras
I know that the qtandroidextras folder is inside of my QT source distribution, but it isn't being built and/or installed. I must be missing a step or configuration option somewhere, but I'm not familiar enough with QT or QT on Android development to spot it.
Related
I am pretty new to Qt (and linux for that matter), but need to build an Android app based on Qt with some basic bluetooth functionality. I have been able to build Qt for Android from source and develop a simple app, but QtBluetooth cannot be found.
Starting point:
Ubuntu 18.10 x64
Android NDK r18b
Android SDK (android-27)
OpenJDK v1.8.0_212
Qt 5.12.3
This is my configure command:
./configure -xplatform android-clang -android-ndk [path to NDK] -android-sdk [path to SDK] -android-ndk-host linux-x86_64 -android-toolchain-version 4.9 -no-warnings-are-errors -android-ndk-platform andoird-27 -opensource -confirm-license -v
The configure output shows that none of the Qt Bluetooth components are enabled, and that this is because
"None of [libbluetooth.so libbluetooth.a] could be found in [] and global paths."
"pkg-config use disabled globally"
This is really frustrating because I've installed those libraries: both of those files are in the /usr/lib/x86_65-linux-gnu/ directory! Also pkg-config is installed...
I have tried adding this path (/usr/lib/x86_64-linux-gnu/) to the configure command and copying these libraries into directories that I would have thought are already included, but these workarounds have been fruitless. I am using git to clean the submdodules and main directory between each attempt.
What am I missing?? It feels like this is sooo close to working.
In circleci environment, calling ndk-build in console gives me the error :
/home/circleci/project/android-ndk-r10d/ndk-build: 158:
/home/circleci/project/android-ndk-r10d/ndk-build: file: not found
but then it runs the ndk-build executable. I'm not sure what's the reason.
The ndk log is below:
NDK_LOG=1 ndk-build -n | grep HOST -C 5
HOST_OS=linux
HOST_ARCH=x86_64
/home/circleci/project/android-ndk-r10d/ndk-build: 158: /home/circleci/project/android-ndk-r10d/ndk-build: file: not found
HOST_ARCH=x86 (32-bit userland detected)
HOST_TAG=linux-x86
GNUMAKE=/usr/bin/make (system path)
Android NDK: NDK installation path auto-detected: '/home/circleci/project/android-ndk-r10d'
Android NDK: GNU Make version 4.1 detected
Android NDK: Host OS was auto-detected: linux
Android NDK: Host operating system detected: linux
/bin/sh: 1: file: not found
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to linux-x86
Android NDK: Host tools prebuilt directory not found
Android NDK: Host 'echo' tool: echo
Android NDK: Host 'echo -n' tool: printf %s
Android NDK: Host 'cmp' tool: cmp
Android NDK: Host 'awk' tool: awk
/home/circleci/project/android-ndk-r10d/build/core/build-local.mk:148: *** Android NDK: Aborting . Stop.
Exited with code 2
so to resolve the "/bin/sh: 1: file: not found" issue, I installed 'file using:
sudo apt-get install -y file
but I still have the error:
#!/bin/bash -eo pipefail
NDK_LOG=1 ndk-build -n | grep HOST -C 5
HOST_OS=linux
HOST_ARCH=x86_64
HOST_ARCH=x86 (32-bit userland detected)
HOST_TAG=linux-x86
GNUMAKE=/usr/bin/make (system path)
Android NDK: NDK installation path auto-detected: '/home/circleci/project/android-ndk-r10d'
Android NDK: GNU Make version 4.1 detected
Android NDK: Host OS was auto-detected: linux
Android NDK: Host operating system detected: linux
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to linux-x86
Android NDK: Host tools prebuilt directory not found
Android NDK: Host 'echo' tool: echo
Android NDK: Host 'echo -n' tool: printf %s
Android NDK: Host 'cmp' tool: cmp
Android NDK: Host 'awk' tool: awk
/home/circleci/project/android-ndk-r10d/build/core/build-local.mk:148: *** Android NDK: Aborting . Stop.
Exited with code 2
How do I resolve this
Android NDK: Host tools prebuilt directory not found
I am a first time linux user. I am just following the instructions how make a mobile application via buildozer git hub.
Finally when i try, i get this:
[INFO]: Will compile for the following archs: armeabi-v7a
[INFO]: Found Android API target in $ANDROIDAPI
[INFO]: Available Android APIs are (19)
[INFO]: Requested API target 19 is available, continuing.
[INFO]: Found NDK dir in $ANDROIDNDK
[INFO]: Got NDK version from $ANDROIDNDKVER
[INFO]: Using Google NDK r9c
[INFO]: Found virtualenv at /usr/local/bin/virtualenv
[INFO]: ccache is missing, the build will not be optimized in the future.
[WARNING]: Could not find toolchain subdirectory!
[WARNING]: Could not find any toolchain for arm-linux-androideabi!
[WARNING]: Missing executable: autoconf is not installed
[WARNING]: Missing executable: automake is not installed
[WARNING]: Missing executable: libtoolize is not installed
[ERROR]: python-for-android cannot continue; aborting
# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3crystacks,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/kivy/buildozer/something/crystax-ndk-10.3.2/.buildozer/android/platform/build
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
kivy#kivyvm:~/buildozer/something/crystax-ndk-10.3.2$
have no idea what it could be.
i did following:
git clone https://github.com/kivy/buildozer
cd buildozer
python setup.py build
sudo pip install -e .
in buildozer i created a folder something.
within something i extracted Crystax NDK
within something i did buildozer init
finally i did buildozer android debug deploy run
Besides of installing buildozer with pip you should also install it's linux dependencies.
If you want to use specific NDK you should edit your buildozer.spec file which appeared in your project folder after you ran buildozer init.
Please take a look at this short manual: it contains lines you should change in buildozer.spec to use Crystax and Python 3.
I am trying to build a project that requires
arm-linux-androideabi-4.8
How do I specifically install arm-linux-androideabi-4.8 alone?
You can't install a subset of the NDK. It's only available as a monolithic package.
download android-ndk-r14b-linux-x86_64.zip
to download type this
cd /
wget https://dl.google.com/android/repository/android-ndk-r14b-linux-x86_64.zip
to unzip
unzip android-ndk-r14b-linux-x86_64.zip
to build
cd /android-ndk-r14b
cd build/tools
export TOOLCHAIN=/android-toolchain
./make_standalone_toolchain.py --arch arm --api 19 --install-dir /android-toolchain
I am trying to install Qt 5.1 for Android, I am using steps described here: http://qt-project.org/wiki/Qt5ForAndroidBuilding
I installed all the prerequisites (JDK, Android SDK, NDK, etc.). My problem is with step 4, I cannot download Qt 5 from the git repo (git://gitorious.org/qt/qt5.git).
Has somebody encountered the same problem?
I took another Qt 5 for Android directly from http://qt-project.org/downloads but it would not build. When I use step 4.4 (configure -....) I got the The system cannot find the file specified: arch.cpp and arch.obj error.
If you have a link or something that wil help me install Qt and deploy an app to Android please share.
The Qt Android version that you have download on qt-project is already built. You don't need to build Qt for Android, but build with Qt for Android. You just need to config Qt Creator to define SDK and NDK dirs. Follow this doc : http://qt-project.org/doc/qtcreator-2.8/creator-developing-android.html (main page : http://qt-project.org/doc/qt-5.1/qtdoc/android-support.html)
This should work:
git clone git://gitorious.org/qt/qt5.git qt5
cd qt5
perl init-repository --no-webkit
configure.bat \
-developer-build \
-xplatform android-g++ \
-nomake tests \
-nomake examples \
-openssl
-android-ndk D:/GitRepo/Resources/X2Go_Android/android-ndk-r8e \
-android-sdk D:/GitRepo/Resources/X2Go_Android/AndroidSDK/sdk \
-skip qttools \
-skip qttranslations \
-skip qtwebkit \
-skip qtwebkit-examples-and-demos
make