How to deploy qt desktop application to android
-
Hello friends.I built an application (https://github.com/cryptoclubber/cryptoclub/blob/master/CryptoClub-qt.pro) as they indicated in their .doc for Win, Mac and Linux, but not for mobile devices as android. I have built and tested environment QT5 (hello world) and operates smoothly. What is the path I have to change to point to the compiler in the .pro? thanks in advance.
TEMPLATE = app
TARGET = CryptoClub-qt
VERSION = 1.0.0
INCLUDEPATH += src src/json src/qt
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE HAVE_CXX_STDHEADERS MINIUPNP_STATICLIB
CONFIG += no_include_pwd
CONFIG += thread
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
lessThan(QT_MAJOR_VERSION, 5): CONFIG += static
QMAKE_CXXFLAGS = -fpermissivegreaterThan(QT_MAJOR_VERSION, 4) {
QT += widgets
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
}win32 {
BOOST_LIB_SUFFIX=-mgw49-mt-s-1_55
BOOST_INCLUDE_PATH=C:/deps/boost_1_55_0
BOOST_LIB_PATH=C:/deps/boost_1_55_0/stage/lib
BDB_INCLUDE_PATH=C:/deps/db-4.8.30.NC/build_unix
BDB_LIB_PATH=C:/deps/db-4.8.30.NC/build_unix
OPENSSL_INCLUDE_PATH=C:/deps/openssl-1.0.1h/include
OPENSSL_LIB_PATH=C:/deps/openssl-1.0.1h
} -
some app when is developed are dependency in a platform. so for creating your app for new platform you should override dependency or delete these dependency and replaced new methods that are acceptable for android platform.
-
First of all you need NDK. Then install Qt for Android using the Maintenance tool. Then in QtCreator under Options/Android you need to provide all needed paths. Then you should have a Kit for Android (if not create one). Use this Kit to build your app for Android.
-
First of all you need NDK. Then install Qt for Android using the Maintenance tool. Then in QtCreator under Options/Android you need to provide all needed paths. Then you should have a Kit for Android (if not create one). Use this Kit to build your app for Android.
@jsulm So correctly configured?
https://gyazo.com/a4f0bd0358e1961c4e7a3ad0a3d1a98a
add environment variables?
https://gyazo.com/50cd4a64291e5bf8c3c57d72dd1c396eThanks in advance
-
@jsulm So correctly configured?
https://gyazo.com/a4f0bd0358e1961c4e7a3ad0a3d1a98a
add environment variables?
https://gyazo.com/50cd4a64291e5bf8c3c57d72dd1c396eThanks in advance
you need
-java-jdk,
-apache-ant,
-sdk android ;
-NDK
go tools->option (menu)
select anndroid:
you should determine path of top tools:
please see image
http://www.mediafire.com/view/gigkpwo0r70b94i/configQtandroid.png#
for more info see
http://blog.rhesoft.com/2014/05/11/tutorial-how-to-use-qt-creator-for-mobile-development-android/ -
@jsulm So correctly configured?
https://gyazo.com/a4f0bd0358e1961c4e7a3ad0a3d1a98a
add environment variables?
https://gyazo.com/50cd4a64291e5bf8c3c57d72dd1c396eThanks in advance
@Requiem Looks good. Did you check whether QtCreator created a Kit for Android? If so you already should be able to build. Under Devices you should be able to add an Android device (please consider: select the same architecture you installed - armeabi-v7a).
-
It seems that the environment is correct, it builds "hello world" without problem. My problem is that I only worked on Qt with command lines and pointing all dependencies to a folder in C: ... with a couple of instructions and changes build headers and compile the code. When I find mistakes, I can look in the code or google, but in this case not find repository or guide for this compilation android, just like building environment and hello world.
Thank you very much for your help -
you need
-java-jdk,
-apache-ant,
-sdk android ;
-NDK
go tools->option (menu)
select anndroid:
you should determine path of top tools:
please see image
http://www.mediafire.com/view/gigkpwo0r70b94i/configQtandroid.png#
for more info see
http://blog.rhesoft.com/2014/05/11/tutorial-how-to-use-qt-creator-for-mobile-development-android/@stackprogramer said:
you need
-java-jdk,
-apache-ant,
-sdk android ;
-NDK
go tools->option (menu)
select anndroid:
you should determine path of top tools:
please see image
http://www.mediafire.com/view/gigkpwo0r70b94i/configQtandroid.png#
for more info see
http://blog.rhesoft.com/2014/05/11/tutorial-how-to-use-qt-creator-for-mobile-development-android/Thanks for the guide.. ^^ This guy is a machine programming :O I need a friend such as he is.... lol !!
Cheers
-
Hello friends
QT += core gui network
android:QT += androidextrasANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
greaterThan(QT_MAJOR_VERSION, 4) {
QT += widgets
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
}TEMPLATE = app
TARGET = mycodetest-qt
VERSION = 0.0.1
INCLUDEPATH += src src/json src/qt
DEFINES += ( I´m STUCK HERE :S )android:DEFINES += (And here stuck again)
CONFIG += no_include_pwd
CONFIG += thread
android:DEPSDIR=/android/arm-gcc-4.8and the problem for "where i put the deps files"...
android:BOOST_LIB_SUFFIX=-gcc-mt-1_55
android:BOOST_INCLUDE_PATH=$$DEPSDIR/include
android:BOOST_LIB_PATH=$$DEPSDIR/lib....bla bla bla the same for all deps...Now....Defines += i tried putting all algorithms , but i get errors .... For the rest, quite happy that I get compilation errors, that is a good way !! :)