HowTo setup Qt 5 on a Mac to develop Andriod apps?
Hi there,
I have successfully programmed an app for Sailfish OS and now I would like to port it to Andriod as well. But I already got issues just setting up Qt.
So I added the SDK and NDK and I can launch a virtual Andriod system via Qt. I also started a simple Hello World app for Andriod but it does not compile:
Code:
Warning: Dependency not found: .../Qt/5.3/android_armv5/plugins/platformthemes
Warning: Dependency not found: .../Qt/5.3/android_armv5/plugins/platforminputcontexts
sh: ant: command not found
Generating Android Package
Input file: .../build-test-Android_f_r_armeabi_GCC_4_8_Qt_5_3_0-Debug/android-libtest.so-deployment-settings.json
Output directory: .../build-test-Android_f_r_armeabi_GCC_4_8_Qt_5_3_0-Debug/android-build
Application binary: .../build-test-Android_f_r_armeabi_GCC_4_8_Qt_5_3_0-Debug/libdsaChar.so
Android build platform: android-19
Install to device: emulator-5554
Building the android package failed!
-- For more information, run this command with --verbose.
23:09:33: Der Prozess ".../Qt/5.3/android_armv5/bin/androiddeployqt" wurde mit dem Rückgabewert 14 beendet.
Fehler beim Erstellen/Deployment des Projekts test (Kit: Android für armeabi (GCC 4.8, Qt 5.3.0))
Bei der Ausführung von Schritt 'Deployment auf Android-Gerät'
I assume I did not set it up correctly. Is there a got tutorial on how to do that on a Mac?
I tried Qt Quick and Qt Widget project. Both ended up with the same error message.
Thanks for your help!
Re: HowTo setup Qt 5 on a Mac to develop Andriod apps?
Line 3 looks like a setup problem.
"ant" is the Java build tool and it seems the script cannot find it. Check if you have ant installed and it is in $PATH
Cheers,
_
Re: HowTo setup Qt 5 on a Mac to develop Andriod apps?
Hi _,
you were right. Ant was not installed an my system so I installed it using MacPorts. After installing and rebooting I still get the same error. So Qt is not finding ant.
Quote:
Check if you have ant installed and it is in $PATH
Terminal tells me for ant -version
Quote:
Apache Ant(TM) version 1.9.4 compiled on April 29 2014
So I guess it is installed but what do you mean by $PATH?
I have a ~/.profile file that looks like this:
Code:
# MacPorts Installer addition on 2014-06-11_at_14:03:53: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
export PATH=/usr/local/apache-ant/bin:"$PATH"
The directory is correct. This is were the files are.
[Update]
Okay I think I got it. Within the Qt Andriod Settings I had to specify the path to ant as well. After doing that I got no errors.