Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Qt Creator has no access to android sdk

    Mobile and Embedded
    7
    23
    11004
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      osmosm last edited by

      Hi,

      I´m using Qt 5.4.0 for Android on my Windows 7 (64 bit)development PC.
      For some reason Qt Creator is not able to access the properly installed android sdk.
      I almost tried everything to get it back work. Uninstalling and reinstalling Java, android sdk, android ndk and apache ant.
      I am able to add android sdk platforms with SDK Manager.exe.
      I am able to make avd´s from installed android sdk platforms with AVD Manager.exe.
      In Qt Creator->Extras->Settings->Android->"Add AVD" I get a error "no AVD could be created for there is no actual android-sdk available. Please install a android-sdk of API version 0 or newer"
      Also I am not able to choose a android-sdk when for building android APK in Kit "Android for armeabi-v7a"

      Any ideas ?
      I am really desperated !!!

      My installed versions:
      Java jdk: jdk-8u25-windows-x64.exe
      android sdk: installer_r24.0.2-windows.exe
      android ndk: android-ndk-r10d-windows-x86_64.exe
      ant: apache-ant-1.9.4-bin.zip
      Qt: qt-opensource-windows-x86-android-5.4.0.exe

      1 Reply Last reply Reply Quote 0
      • raven-worx
        raven-worx Moderators last edited by

        maybe a stupid question, but did you add the android SDK and NDK paths to QtCreator?
        Tools ->Options -> Android

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply Reply Quote 0
        • O
          osmosm last edited by

          Thank you for the hint.

          Yes, I defined all the paths to the component folders.
          But it still doesn´t work.

          1 Reply Last reply Reply Quote 0
          • O
            osmosm last edited by

            One more information:

            I get following message in Qt Creator in tab "common output":
            "The system cannot locate the defined path"
            "Das System kann den angegebenen Pfad nicht finden"

            1 Reply Last reply Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              Hi,

              IIRC, google broke something with the r10 ndk, they moved files around so they can't be find properly currently. r9 should work without any problem

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply Reply Quote 0
              • O
                osmosm last edited by

                I tried ndk r9b without success.

                What makes me surprise, I succeeded to install the components above on another PC at home, and it´s running well.

                It seems, there are some old paths stored somewhere, so I cannot use Qt for Android on my first PC system anymore.

                1 Reply Last reply Reply Quote 0
                • SGaist
                  SGaist Lifetime Qt Champion last edited by

                  Did you check your PATH environment variable ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply Reply Quote 0
                  • O
                    osmosm last edited by

                    Here is my path settings:

                    C:\Users\osm>path
                    PATH=C:\Program Files\SAP\EasyDmsInterface\Unicode;C:\ProgramData\Oracle\Java\ja
                    vapath;C:\Oracle11_32\product\11.2.0\client_1\bin;C:\WINDOWS\system32;C:\WINDOWS
                    ;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program
                    Files (x86)\OpenText\Viewer\bin;C:\Program Files (x86)\Common Files\Siemens\Sys
                    tem;C:\Program Files (x86)\Common Files\Acronis\SnapAPI;C:\Program Files\Tortoi
                    seSVN\bin;C:\Users\osm\AppData\Local\Android\sdk\platform-tools;C:\Users\osm\App
                    Data\Local\Android\sdk\tools;C:\Users\osm\AppData\Local\Android\sdk;C:\Program F
                    iles\Java\jdk1.8.0_25\bin;C:\Program Files\SAP\EasyDmsInterface\Unicode

                    My environment variables:
                    JAVA_HOME=C:\Program Files\Java\jdk1.8.0_25
                    JDK_HOME=C:\Program Files\Java\jdk1.8.0_25
                    ANDROID_SDK_ROOT=C:\Users\osm\AppData\Local\Android\sdk

                    1 Reply Last reply Reply Quote 0
                    • O
                      osmosm last edited by

                      Is there a possibility to start Qt Creator with some file logging ?

                      As I already mentioned I get following message in Qt Creator in tab “common output”:

                      ENG: “The system cannot locate the defined path”
                      GER: “Das System kann den angegebenen Pfad nicht finden”

                      1 Reply Last reply Reply Quote 0
                      • SGaist
                        SGaist Lifetime Qt Champion last edited by

                        You can start it with QT_DEBUG_PLUGINS=1 to see what they are doing (Qt Creator is essentially based on plugins)

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply Reply Quote 0
                        • O
                          osmosm last edited by

                          Hi SGaist,

                          where can I find the logging if I set environment variable QT_DEBUG_PLUGINS=1 ?

                          1 Reply Last reply Reply Quote 0
                          • O
                            osmosm last edited by

                            That´s my compilers output when I try to build a android project

                            14:47:38: Führe Schritte für Projekt 1212 aus...
                            14:47:38: Unveränderte Konfiguration, qmake-Schritt wird übersprungen.
                            14:47:38: Starte "C:\Qt\Qt5.4.0\Tools\mingw491_32\bin\mingw32-make.exe"
                            mingw32-make: Nothing to be done for 'first'.
                            14:47:41: Der Prozess "C:\Qt\Qt5.4.0\Tools\mingw491_32\bin\mingw32-make.exe" wurde normal beendet.
                            14:47:41: Removing directory D:\projekte\build-1212-Android_for_armeabi_v7a_GCC_4_8_Qt_5_4_0-Release\android-build
                            14:47:41: Starte "C:\Qt\Qt5.4.0\Tools\mingw491_32\bin\mingw32-make.exe" INSTALL_ROOT="D:\projekte\build-1212-Android_for_armeabi_v7a_GCC_4_8_Qt_5_4_0-Release\android-build" install
                            copy /y "lib1212.so" "D:\projekte\build-1212-Android_for_armeabi_v7a_GCC_4_8_Qt_5_4_0-Release\android-build\libs\armeabi-v7a\lib1212.so"
                            1 Datei(en) kopiert.
                            14:47:43: Der Prozess "C:\Qt\Qt5.4.0\Tools\mingw491_32\bin\mingw32-make.exe" wurde normal beendet.
                            14:47:43: Starting: "C:\Qt\Qt5.4.0\5.4\android_armv7\bin\androiddeployqt.exe" --input D:/projekte/build-1212-Android_for_armeabi_v7a_GCC_4_8_Qt_5_4_0-Release/android-lib1212.so-deployment-settings.json --output D:/projekte/build-1212-Android_for_armeabi_v7a_GCC_4_8_Qt_5_4_0-Release/android-build --deployment bundled --android-platform android--1 --jdk "C:/Program Files/Java/jdk1.8.0_25" --ant C:/Qt-Addons/apache-ant-1.9.4/bin/ant.bat
                            Error: Target id 'android--1' is not valid. Use 'android.bat list targets' to get the target ids.
                            Generating Android Package
                            Input file: D:/projekte/build-1212-Android_for_armeabi_v7a_GCC_4_8_Qt_5_4_0-Release/android-lib1212.so-deployment-settings.json
                            Output directory: D:/projekte/build-1212-Android_for_armeabi_v7a_GCC_4_8_Qt_5_4_0-Release/android-build/
                            Application binary: D:/projekte/build-1212-Android_for_armeabi_v7a_GCC_4_8_Qt_5_4_0-Release/lib1212.so
                            Android build platform: android--1
                            Install to device: No
                            Buildfile: build.xml does not exist!
                            Build failed
                            Warning: Android platform 'android--1' does not exist in SDK.
                            Building the android package failed!
                            -- For more information, run this command with --verbose.
                            14:48:01: Der Prozess "C:\Qt\Qt5.4.0\5.4\android_armv7\bin\androiddeployqt.exe" wurde mit dem Rückgabewert 14 beendet.
                            Fehler beim Erstellen/Deployment des Projekts 1212 (Kit: Android for armeabi-v7a (GCC 4.8, Qt 5.4.0))
                            Bei der Ausführung von Schritt "Build Android APK"
                            14:48:01: Verstrichene Zeit: 00:23.

                            1 Reply Last reply Reply Quote 0
                            • O
                              osmosm last edited by

                              That´s my output when I execute the commando "android.bat list target":

                              C:\Users\osm\AppData\Local\Android\sdk\tools>android.bat list target

                              Microsoft Windows [Version 6.1.7601]
                              Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.

                              C:\Users\osm\AppData\Local\Android\sdk\tools>android.bat list target
                              Available Android targets:

                              id: 1 or "android-21"
                              Name: Android 5.0.1
                              Type: Platform
                              API level: 21
                              Revision: 2
                              Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, W
                              XGA720, WXGA800, WXGA800-7in, AndroidWearRound, AndroidWearSquare, AndroidWearRo
                              und, AndroidWearSquare
                              Tag/ABIs : android-tv/armeabi-v7a, android-tv/x86, android-wear/armeabi-v7a, an
                              droid-wear/x86, default/armeabi-v7a, default/x86, default/x86_64

                              id: 2 or "Google Inc.:Google APIs:21"
                              Name: Google APIs
                              Type: Add-On
                              Vendor: Google Inc.
                              Revision: 1
                              Description: Android + Google APIs
                              Based on Android 5.0.1 (API level 21)
                              Libraries:
                              * com.android.future.usb.accessory (usb.jar)
                              API for USB Accessories
                              * com.google.android.media.effects (effects.jar)
                              Collection of video effects
                              * com.google.android.maps (maps.jar)
                              API for Google Maps
                              Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, W
                              XGA720, WXGA800, WXGA800-7in, AndroidWearRound, AndroidWearSquare, AndroidWearRo
                              und, AndroidWearSquare
                              Tag/ABIs : google_apis/x86

                              C:\Users\osm\AppData\Local\Android\sdk\tools>

                              1 Reply Last reply Reply Quote 0
                              • O
                                osmosm last edited by

                                Nobody left with any idea ?
                                I´m really disappointed from Qt !!

                                1 Reply Last reply Reply Quote 0
                                • SGaist
                                  SGaist Lifetime Qt Champion last edited by

                                  What it strange is that it seems you have a mismatch between your current target and the one used when trying to install the application.

                                  Are you trying to run your software on a device ?

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply Reply Quote 0
                                  • O
                                    osmosm last edited by

                                    I cannot run my software on a device, because the get the error:

                                    Error: Target id ‘android—1’ is not valid. Use ‘android.bat list targets’ to get the target ids.

                                    But I think that is only a wrong path problem.
                                    As I already mentioned I get following error message in Qt Creator in tab “common output” when I press the button "Apply" or "OK" in dialog Settings->Android where I define the paths to SDK,NDK,JDK and ANT:

                                    ENG: “The system cannot locate the defined path”
                                    GER: “Das System kann den angegebenen Pfad nicht finden”

                                    How can I determine which path the system cannot find ?
                                    I should have more information.

                                    1 Reply Last reply Reply Quote 0
                                    • O
                                      osmosm last edited by

                                      I added a new user profile in Win7 and installed the Qt 5.4.0 for Android software again. But I had no success. Still I get the error in Qt Creator->Extras->Settings->Android->“Add AVD” :
                                      “no AVD could be created for there is no actual android-sdk available. Please install a android-sdk of API version 0 or newer”

                                      Can I no longer use Qt on my PC ?
                                      Hello, is that really possible ?
                                      What´s the problem ?

                                      1 Reply Last reply Reply Quote 0
                                      • O
                                        osmosm last edited by

                                        Today I installed Qt for Android 5.4.1 on my Windows7 host.

                                        DEEP DISAPPOINTMENT !!!!
                                        The problem still consists. No access to Android SDK !!!!

                                        Is there nobody who matters that problem but me ??????

                                        1 Reply Last reply Reply Quote 0
                                        • yogeshpatel23
                                          yogeshpatel23 last edited by

                                          Have you mentioned path of JDK, SDk & NDK correctly ?
                                          like :

                                          C:\Program Files (x86)\Java\jdk1.6.0_29
                                          D:\Android\android
                                          D:\Android\androidndk

                                          did you installed Android with eclipse?

                                          Thanks,
                                          Yogesh

                                          1 Reply Last reply Reply Quote 0
                                          • T
                                            tusharkant15 last edited by

                                            Hi, I faced the same problem today after upgrading to Qt 5.4.1 and the solution that worked for me was to delete all config files used by qtcreator, start qtcreator and setup JDK, Android SDK+NSK and download apache ant and provide the path to the ant binary. I use linux and up until now the system provided jdk and ant worked fine but after upgrading to 5.4.1 I had to get the latest jdk and ant binaries from the respective sites and this seems to have fixed the problem (maybe clearing out old config files also helped).

                                            If you are wondering where the config files are, on linux they are usually:
                                            ~/.config/QtProject/
                                            ~/.config/QtProject.conf
                                            ~/.config/Trolltech.conf

                                            Peace!

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post