Skip to content

Deploying Windows to Android

rinlt edited this page Dec 17, 2021 · 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

C:\android-sdk-windows\tools

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

  • Use the Android sdkmanager to download the necessary dependencies
C:\android-sdk-windows\tools\bin\sdkmanager.bat "platform-tools" "build-tools;28.0.3" "platforms;android-28"
C:\

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 build in release mode and sign your *.apk with the provided keystore using the credentials from within jks_alias and jks_pass

You can find more info about app signing and how to create a *.jks keystore here

You can also find a working example here

Clone this wiki locally