Skip to content

Deploying Linux to Android

therecipe edited this page Dec 17, 2018 · 10 revisions

Docker deployment

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.

Regular deployment

$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;28.0.3" "platforms;android-28"
$HOME

If you have to, you can also define a custom location with ANDROID_NDK_DIR

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.

Signing your application

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

Clone this wiki locally