-
Notifications
You must be signed in to change notification settings - Fork 748
Deploying Linux to Android
-
Install Docker: https://store.docker.com/search?offering=community&type=edition or using a package manager
-
If necessary run docker as root
-
Pull the target image
docker pull therecipe/qt:android
- Deploy your application
qtdeploy -docker build android
or
qtdeploy -docker build android-emulator
You should find your deployed application inside the deploy
subfolder.
- Install the official version of Qt
- Download the Android SDK: https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
- Extract the Android SDK to
$HOME/android-sdk-linux/
If you have to, you can also define a custom location with ANDROID_SDK_DIR
- Use the Android sdkmanager to download the necessary dependencies
$HOME/android-sdk-linux/tools/bin/sdkmanager "platform-tools" "build-tools;26.0.0" "platforms;android-25"
- Download the Android NDK: https://dl.google.com/android/repository/android-ndk-r14b-linux-x86_64.zip
- Extract the Android NDK to
$HOME
If you have to, you can also define a custom location with ANDROID_NDK_DIR
-
Install the Java Development Kit: https://download.java.net/java/jdk8u192/archive/b04/binaries/jdk-8u192-ea-bin-b04-linux-x64-01_aug_2018.tar.gz; If you have to, you can also define a custom location with JDK_DIR
-
If you haven't already, run the setup for android
qtsetup full android && qtsetup full android-emulator
- Deploy your application
qtdeploy build android
or
qtdeploy build android-emulator
You should find your deployed application inside the deploy
subfolder.
If you want to have your *.apk
signed automatically, then you just need to create an jks_alias
, jks_pass
and an project_name.jks
inside the android
or android-emulator
subfolder of your project's root directory
project_name
├── android
│ ├── project_name.jks
│ ├── jks_alias
│ └── jks_pass
└── android-emulator -> ./android/
qtdeploy
will then automatically sign your *.apk
with the provided keystore using the credentials from within jks_alias
and jks_pass
You can find more infos about app signing and how to create a *.jks
keystore here
You can also find a working example here