Results 1 to 3 of 3

Thread: HowTo setup Qt 5 on a Mac to develop Andriod apps?

  1. #1
    Join Date
    Apr 2014
    Posts
    116
    Thanks
    8
    Qt products
    Qt5
    Platforms
    MacOS X

    Default 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:
    Qt Code:
    1. Warning: Dependency not found: .../Qt/5.3/android_armv5/plugins/platformthemes
    2. Warning: Dependency not found: .../Qt/5.3/android_armv5/plugins/platforminputcontexts
    3. sh: ant: command not found
    4. Generating Android Package
    5. Input file: .../build-test-Android_f_r_armeabi_GCC_4_8_Qt_5_3_0-Debug/android-libtest.so-deployment-settings.json
    6. Output directory: .../build-test-Android_f_r_armeabi_GCC_4_8_Qt_5_3_0-Debug/android-build
    7. Application binary: .../build-test-Android_f_r_armeabi_GCC_4_8_Qt_5_3_0-Debug/libdsaChar.so
    8. Android build platform: android-19
    9. Install to device: emulator-5554
    10. Building the android package failed!
    11. -- For more information, run this command with --verbose.
    12. 23:09:33: Der Prozess ".../Qt/5.3/android_armv5/bin/androiddeployqt" wurde mit dem Rückgabewert 14 beendet.
    13. Fehler beim Erstellen/Deployment des Projekts test (Kit: Android für armeabi (GCC 4.8, Qt 5.3.0))
    14. Bei der Ausführung von Schritt 'Deployment auf Android-Gerät'
    To copy to clipboard, switch view to plain text mode 
    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!

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default 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,
    _

  3. #3
    Join Date
    Apr 2014
    Posts
    116
    Thanks
    8
    Qt products
    Qt5
    Platforms
    MacOS X

    Default 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.
    Check if you have ant installed and it is in $PATH
    Terminal tells me for ant -version
    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:
    Qt Code:
    1. # MacPorts Installer addition on 2014-06-11_at_14:03:53: adding an appropriate PATH variable for use with MacPorts.
    2. export PATH=/opt/local/bin:/opt/local/sbin:$PATH
    3. # Finished adapting your PATH environment variable for use with MacPorts.
    4.  
    5. export PATH=/usr/local/apache-ant/bin:"$PATH"
    To copy to clipboard, switch view to plain text mode 
    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.
    Last edited by KeineAhnung; 11th June 2014 at 16:26.

Similar Threads

  1. Replies: 5
    Last Post: 27th June 2013, 14:22
  2. Calling All Programmers, Develop Apps and monetize your app Today!!
    By therohan in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 9th July 2012, 12:50
  3. Develop C++ IDE
    By mvbhavsar in forum Newbie
    Replies: 8
    Last Post: 28th March 2011, 18:16
  4. Replies: 1
    Last Post: 30th July 2010, 07:23
  5. Replies: 0
    Last Post: 26th June 2009, 17:53

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.