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
Related
I recently switched to Apple M1 and am having a problem creating a docker image that eventually runs on a Buildkite linux CI. The same code runs just fine on my MacBook with an Intel chip and successfully creates a docker image.
The problem happens when sdkmanager tries to pull in build-tools;${ANDROID_BUILD_TOOLS_VERSION} with the latest commandlinetools, it fails with the following errors:
Warning: Dependant package with key emulator not found!
Warning: Unable to compute a complete list of dependencies.ates...
The closest issues I can find are Install build-tools: emulator not found and Error with android sdk, both without any resolutions. Also note that I have run sdkmanager --list, and emulator is not present as an available package there (just on M1).
Here is my Dockerfile (I don't work with docker too often so please excuse if the code is not the cleanest):
FROM gradle:7.4-jdk11
ENV SDK_URL="https://dl.google.com/android/repository/commandlinetools-linux-8092744_latest.zip" \
ANDROID_HOME="/usr/local/android-sdk" \
ANDROID_VERSION=32 \
ANDROID_BUILD_TOOLS_VERSION=32.0.0
RUN mkdir "$ANDROID_HOME" .android \
&& cd "$ANDROID_HOME" \
&& curl -o sdk.zip $SDK_URL \
&& unzip sdk.zip \
&& rm sdk.zip \
&& yes | $ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME --licenses \
&& $ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME --update \
&& $ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME "platform-tools" "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \
&& $ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME "platforms;android-${ANDROID_VERSION}" \
&& apt-get update \
&& apt-get install -y build-essential file apt-utils curl gnupg \
&& curl -sL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get -y install nodejs \
&& npm install -g firebase-tools -y \
&& rm -rf /var/lib/apt/lists/*
Side note; I had to upgrade usage of jdk8 to jdk11 for the Android build agent, the previous implementation was pulling in sdk-tools-linux-3859397.zip instead of commandlinetools-linux-8092744_latest.zip, and that was able to pull in build-tools via the sdkmanager just fine on the M1 as well and created a docker image.
Given that it builds on Intel, my task is technically complete, but it's going to be much easier in the long run that it runs on M1. Any ideas? Or can anyone suggest what the right place would be to raise this? Do you reckon it is a google command line tool issue or docker issue?
I just had the same problem on M1 Pro and this solved the issue for me.
In short: emulator is not available on Arm (M1) yet so you need to install it manually. You can follow the official guide but in short, this worked for me
Download emulator for Apple Silicon (example or you find more links in the [official guide](https://developer.android.com/studio/emulator_archive
Unzip the folder in Android SDK folder (it will create a SKD/emulator folder with files inside)
Create SDK/emulator/package.xml file with content from here and update the last part of the xml <revision><major>31</major><minor>1</minor><micro>4</micro></revision> with the version you downloaded
You should not see the same error again on M1 🎉
Spoiler Alert: I'm still not able to fully build on M1 because, during the actual build, I get the error
qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
I have same issue. I think there is no android 'emulator' package for linux/armv8 . So you won't be able to use docker with native images.
I tried to configure docker-compose file in order to use linux/x86_64 instead of linux/armv8 but there are others issues.
I add this line in docker-compose.yaml :
platform: linux/x86_64
like this :
version: '3.7'
services:
android:
platform: linux/x86_64
build:
dockerfile: Dockerfile
context: ./Docker
working_dir: /app/Android/Scripts
volumes:
- ../:/app:rw,cached
command: ./build_distribution.sh
# command: sh -c "while true; do sleep 10; done"
But I get a lot of issue with network. It seems that network layer on this architecture is buggy and sometimes it is stuck downloading an image or a component randomly...
Is there a way to make it work with one or other architecture ?
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.
Font Error in Android-Studio:
I faced the problem while installing Android-Studio-3.0 in Arch Linux distro,
help me solve the issue. I installed using yaourt package manager.
The fonts used by Android studio are indeed missing.
Here are all the fonts I install on every fresh archlinux install to never think about it anymore:
pacman -S xorg-fonts-type1 ttf-dejavu artwiz-fonts font-bh-ttf \
font-bitstream-speedo gsfonts sdl_ttf ttf-bitstream-vera \
ttf-cheapskate ttf-liberation \
ttf-freefont ttf-arphic-uming ttf-baekmuk
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.
We are using HockeyApp for our Android application.
We want to automate all the deployment process. We started using Bamboo to build our .apk file and final step would be to distribute it to Hockey.
After a lot of browsing on the internet, I couldn't found any plugin available to do that. The only thing I found out available was: IOS, Cocoa and Xcode Support for Bamboo plugin - but this is for IOS only.
If there is no other plugin for Bamboo to use maybe someone knows a way that we can automate the process to distribute the .apk to Hockey? (e.g. write a script or something that HockeyApp supports).
Thank you,
Luisa
After some tinkering I found a method that works for me. I added an additional Script to the Build Job and used the following in the script body (be sure to use the apk filename in your config):
curl \
-F "status=2" \
-F "notify=1" \
-F "notes=Some new features and fixed bugs." \
-F "notes_type=0" \
-F "ipa=#app/build/outputs/apk/app-release.apk" \
-H "X-HockeyAppToken: AppTokenHere" \
https://rink.hockeyapp.net/api/2/apps/upload