- Get link
- X
- Other Apps
This post assumed you know about QT,
and you would choose QT for cross platform development.
I chose QT for cross platform development and today I am going to talk about how to deploy android application using QT via QT Creator. First, you would need to take a look to this page.
***This blog is refering to QT5.4.1 and QT Creator 3.0
TO SETUP
1) The first thing you would need to do is to get a QT-Creator and QT at the official page . Do remember to get Qt for android too! (because the default installer did not include android)
2) Java SE Development Kit (JDK) v6 or later. You can also use OpenJDK on Linux. Android apps are written in the Java programming language. (originally) So you must have JDK in order to run your qt apps for android!
3) Then you would need to get The Android SDK Tools. If you do not know what it is... hmm.. You could understand it as the libraries for android.. If you need more help, you could go to the android
developers page...
Select the stand-alone SDK tools. (You don't need Android Studio since you have QT Creator)
google usb driver and google web driver...)
You should check carefully which version you should use, as qt might not support the latest version :) (And the tablet that you deployed to might not have the latest version too)
At the same folder, run AVD manager as administrator also:
AVD manager is a place where you could manage your virtual device/simulator for you to test android apps on your computer directly. You could try adding some devices. :)
4) Getting The Android NDK. If you do not know what it is, it is "a toolset that allows you to implement parts of your app using native-code languages such as C and C++.".
You must get this after you have set up your SDK, cause it is installed based on the SDK. :)
5) Getting Apache Ant v1.8 or later. Apache Ant is a Java library and command-line tool that help building software.
Just download any release you want. :)
You would need to set environment variables for apache ant too! (Reference Link)
6) Setting environment variables:
a) JAVA_HOME: <the path to your java folder> , ie: C:\Program Files\Java\jdk1.7.0_75
b) ANT_HOME: <the path to your ant folder>, ie: C:\apache-ant-1.9.4
c) PATH: add these following:
(i) ${ANT_HOME}/bin (Unix) or %ANT_HOME%/bin (Windows)
(ii) ${JAVA_HOME}/bin (Unix) or %JAVA_HOME%/bin (Windows)
(iii) <path to your sdk>/tools, ie: C:\Program Files (x86)\Android\android-sdk\tools
(iv) <path to your sdk>/platform-tools, ie: C:\Program Files (x86)\Android\android-sdk\platform-tools
7) On Windows,
you need the following additional installations:
Android Debug Bridge (ADB) driver on the Windows platform to enable USB debugging. The default USB driver on Windows does not allow debugging. For details about how to get the USB driver, see http://developer.android.com/sdk/win-usb.html (it is actually the google usb driver you installed using SDK tool)
8) If you are facing problem connecting your own device to your qt,
You could try install PDAnet , it solves my problem. :)
TO DEVELOP
Just like any qt apps, but have some qt features not supported, ex: qtWebKit. You should check whether the qt library you are going to use is supported by qt android before the development. Others are the same. You could refer to QT tutorial, mobile tutorial and their reference. Good luck in developing!
To check, go to Projects, find the android kit..
Then you could select the way to deploy at here:
TROUBLESHOOT
END
Jun Wei
and you would choose QT for cross platform development.
I chose QT for cross platform development and today I am going to talk about how to deploy android application using QT via QT Creator. First, you would need to take a look to this page.
***This blog is refering to QT5.4.1 and QT Creator 3.0
TO SETUP
1) The first thing you would need to do is to get a QT-Creator and QT at the official page . Do remember to get Qt for android too! (because the default installer did not include android)
2) Java SE Development Kit (JDK) v6 or later. You can also use OpenJDK on Linux. Android apps are written in the Java programming language. (originally) So you must have JDK in order to run your qt apps for android!
3) Then you would need to get The Android SDK Tools. If you do not know what it is... hmm.. You could understand it as the libraries for android.. If you need more help, you could go to the android
developers page...
Select the stand-alone SDK tools. (You don't need Android Studio since you have QT Creator)
After installing the stand-alone SDK Tools, go to your sdk directory (it should be inside Program Files (x86) /android if you are using windows and you did not change the path settings), choose SDK Manager and run it as admin, then install the necessary stuff:
(ex: at least 1 SDK build tool, SDK tools, SDK Platform tools, android apis, android support library,,google usb driver and google web driver...)
You should check carefully which version you should use, as qt might not support the latest version :) (And the tablet that you deployed to might not have the latest version too)
At the same folder, run AVD manager as administrator also:
AVD manager is a place where you could manage your virtual device/simulator for you to test android apps on your computer directly. You could try adding some devices. :)
4) Getting The Android NDK. If you do not know what it is, it is "a toolset that allows you to implement parts of your app using native-code languages such as C and C++.".
You must get this after you have set up your SDK, cause it is installed based on the SDK. :)
5) Getting Apache Ant v1.8 or later. Apache Ant is a Java library and command-line tool that help building software.
Just download any release you want. :)
You would need to set environment variables for apache ant too! (Reference Link)
6) Setting environment variables:
a) JAVA_HOME: <the path to your java folder> , ie: C:\Program Files\Java\jdk1.7.0_75
b) ANT_HOME: <the path to your ant folder>, ie: C:\apache-ant-1.9.4
c) PATH: add these following:
(i) ${ANT_HOME}/bin (Unix) or %ANT_HOME%/bin (Windows)
(ii) ${JAVA_HOME}/bin (Unix) or %JAVA_HOME%/bin (Windows)
(iii) <path to your sdk>/tools, ie: C:\Program Files (x86)\Android\android-sdk\tools
(iv) <path to your sdk>/platform-tools, ie: C:\Program Files (x86)\Android\android-sdk\platform-tools
7) On Windows,
you need the following additional installations:
Android Debug Bridge (ADB) driver on the Windows platform to enable USB debugging. The default USB driver on Windows does not allow debugging. For details about how to get the USB driver, see http://developer.android.com/sdk/win-usb.html (it is actually the google usb driver you installed using SDK tool)
8) If you are facing problem connecting your own device to your qt,
You could try install PDAnet , it solves my problem. :)
TO DEVELOP
Just like any qt apps, but have some qt features not supported, ex: qtWebKit. You should check whether the qt library you are going to use is supported by qt android before the development. Others are the same. You could refer to QT tutorial, mobile tutorial and their reference. Good luck in developing!
TO DEPLOY / TEST
You should take a look at QT Android deployment documentation using QT CREATOR first.
Make sure you have the android kit added!
You should take a look at QT Android deployment documentation using QT CREATOR first.
Make sure you have the android kit added!
To check, go to Projects, find the android kit..
Then you could select the way to deploy at here:
On Project-> build (Your android kit) -> Build Android APK -> Details -> Qt Deployment.
The options:
Bundle Qt libraries in APK:
As a stand-alone, distributable application package (APK).
Use Ministro service to install Qt: (Requires mobile user to install Ministro)
As a minimal APK that contains a dependency to the Ministro tool. The Ministro tool downloads the necessary Qt libraries from a repository of your choice.
Deploy local Qt libraries to temporary directory:
As an incomplete APK that is suitable for testing and debugging applications on a device connected to the development host. The APK relies on the device containing the Qt libraries in the correct location. Qt Creator copies the libraries to that location the first time you deploy the application
You should create templates before you deploy too! (This "create templates" function will let you create the android manifest file that is needed for your deployment)
1) qt version for architecture mips is missing
Qt versions for architecture mips is missing. To add the Qt versions, select Options > Build & Run >Qt versions.
Note: If you are getting the warning, that mips platform is missing, you can normally ignore that. If you need MIPS you have to note this:
Because of missing support for MIPS in the JavaScript engine used in QtQuick 2, there is no binary package for that architecture.
If your app does not require Qt Quick 2, you can build Qt manually for MIPS. If you require Qt Quick 2 for MIPS, unfortunately the only solution right now is to build from the dev repository (which is under active development and not as stable) or wait for Qt 5.2, where this problem should be fixed.
If your app does not require MIPS support, you can safely ignore the warning in Qt Creator.
2) qt version for architecture arms/ (x86) is missing
If you have installed QT android, then you should import the qt version to solve this issue:
Go to Tools -> Options ->Build & Run -> Qt Versions -> Add
You could go to your Qt directory->5.4 (or your other version) -> go to all of these folders (one by one of course) -> bin -> qmake.exe
And that's it!
That's all that matters!
It has lots to do but trust me, it worths that effort when you saw your apps is successfully deployed to your tablet/mobile, like this:
Good luck and happy programming! :D
Jun Wei
4/4/2015
12:04am
Comments


im very impressed with your post because this post is very beneficial for me and provide a new knowledge to me
ReplyDeleteQt Creator 4.15.2 Crack
Thanks for your comment. Glad that it helps you. :D
DeleteWow, amazing block structure! How long
ReplyDeleteHave you written a blog before? Working on a blog seems easy.
The overview of your website is pretty good, not to mention what it does.
In the content!
Qt Creator Crack
Telegram Desktop Crack
Apeaksoft Screen Recorder Crack
Ertugrul Ghazi Crack
Adobe Audition CC Crack
GraphPad Prism Crack
Thanks for your comment. I am glad that it helps. :) Yea I have started writing blog since I was young.
DeleteThanks for your reply. I am glad that it helps you. I will work more on providing meaningful content. :D
ReplyDelete