Deploying Windows to Android - therecipe/qt GitHub Wiki
Docker deployment
-
Install Docker: https://download.docker.com/win/stable/Docker%20for%20Windows%20Installer.exe
-
Share the drive containing your GOPATH with docker
-
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.
Regular deployment
- Install the [official version of Qt](/therecipe/qt/wiki/Installation-on-Windows#official-version-with-android-support)
- Download the Android SDK: https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip
- Extract the Android SDK tools to
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"
- Download the Android NDK: https://dl.google.com/android/repository/android-ndk-r18b-windows-x86_64.zip
- Extract the Android NDK to
C:\
If you have to, you can also define a custom location with ANDROID_NDK_DIR
-
Install the Java Development Kit: https://adoptopenjdk.net/index.html?variant=openjdk8; 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.
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