Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [SOLVED] Qt creator won't detect my android device
QtWS25 Last Chance

[SOLVED] Qt creator won't detect my android device

Scheduled Pinned Locked Moved Mobile and Embedded
19 Posts 5 Posters 20.6k Views
  • 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.
  • p3c0P Offline
    p3c0P Offline
    p3c0
    Moderators
    wrote on last edited by
    #8

    Now im to quite unsure what the problem could be. But can you try to compile for target api 18 to check atleast for it the apk is created ?

    157

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgb3
      wrote on last edited by
      #9

      I did it, but I found no "bin" directory under my project dir/android. Would there be a reason for Qt Creator not being creating the APK?

      1 Reply Last reply
      0
      • p3c0P Offline
        p3c0P Offline
        p3c0
        Moderators
        wrote on last edited by
        #10

        Hi,

        bin directory will be created when you deploy the application. Was the deploy process initiated for target api 18 ?

        157

        1 Reply Last reply
        0
        • L Offline
          L Offline
          lgb3
          wrote on last edited by
          #11

          For API Level 18, exactly the same thing happens:

          The same error message of "Android device not found" (which was already expected, since there was no device connected indeed), AVD Manager os popped, and there is not the creation of a /bin directory under /android for my project.

          I guess my ultimate trial would be to try with Qt 5.2 Alpha. Is there a way to report this bug to Qt?

          1 Reply Last reply
          0
          • p3c0P Offline
            p3c0P Offline
            p3c0
            Moderators
            wrote on last edited by
            #12

            Can you paste the whole compile output and deploy output here for target API 18 ? Will check it for last time.
            Also can get the screenshot of "Tools > Options > Android" window and paste here.

            157

            1 Reply Last reply
            0
            • L Offline
              L Offline
              lgb3
              wrote on last edited by
              #13

              This is the compile output :
              @20:47:10: Running steps for project accelbubble...
              20:47:10: Configuration unchanged, skipping qmake step.
              20:47:10: Starting: "/usr/bin/make"
              /home/guilhermebrant/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -std=gnu++0x -g -g -marm -O0 -fno-omit-frame-pointer -Wall -Wno-psabi -W -D_REENTRANT -fPIE -DQT_NO_PRINTDIALOG -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_QUICK_LIB -DQT_SVG_LIB -DQT_QML_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DQT_SENSORS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../Qt/5.1.1/android_armv7/mkspecs/android-g++ -I../accelbubble -I../../../Qt/5.1.1/android_armv7/include -I../../../Qt/5.1.1/android_armv7/include/QtQuick -I../../../Qt/5.1.1/android_armv7/include/QtSvg -I../../../Qt/5.1.1/android_armv7/include/QtQml -I../../../Qt/5.1.1/android_armv7/include/QtWidgets -I../../../Qt/5.1.1/android_armv7/include/QtXml -I../../../Qt/5.1.1/android_armv7/include/QtSensors -I../../../Qt/5.1.1/android_armv7/include/QtNetwork -I../../../Qt/5.1.1/android_armv7/include/QtGui -I../../../Qt/5.1.1/android_armv7/include/QtCore -I. -I../../../android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.6/include -I../../../android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/include -I../../../android-ndk-r9/platforms/android-9/arch-arm/usr/include -I. -o main.o ../accelbubble/main.cpp
              /home/guilhermebrant/Qt/5.1.1/android_armv7/bin/rcc -name accelbubble ../accelbubble/accelbubble.qrc -o qrc_accelbubble.cpp
              /home/guilhermebrant/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -std=gnu++0x -g -g -marm -O0 -fno-omit-frame-pointer -Wall -Wno-psabi -W -D_REENTRANT -fPIE -DQT_NO_PRINTDIALOG -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_QUICK_LIB -DQT_SVG_LIB -DQT_QML_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DQT_SENSORS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../Qt/5.1.1/android_armv7/mkspecs/android-g++ -I../accelbubble -I../../../Qt/5.1.1/android_armv7/include -I../../../Qt/5.1.1/android_armv7/include/QtQuick -I../../../Qt/5.1.1/android_armv7/include/QtSvg -I../../../Qt/5.1.1/android_armv7/include/QtQml -I../../../Qt/5.1.1/android_armv7/include/QtWidgets -I../../../Qt/5.1.1/android_armv7/include/QtXml -I../../../Qt/5.1.1/android_armv7/include/QtSensors -I../../../Qt/5.1.1/android_armv7/include/QtNetwork -I../../../Qt/5.1.1/android_armv7/include/QtGui -I../../../Qt/5.1.1/android_armv7/include/QtCore -I. -I../../../android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.6/include -I../../../android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/include -I../../../android-ndk-r9/platforms/android-9/arch-arm/usr/include -I. -o qrc_accelbubble.o qrc_accelbubble.cpp
              /home/guilhermebrant/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/home/guilhermebrant/android-ndk-r9/platforms/android-9/arch-arm/ -Wl,-soname,libaccelbubble.so -Wl,-rpath=/data/bamboo/xml-data/build-dir/DQTC-LGPLRELEASEBUILD510-LGPLANDROIDLINUXX64510ARMV7/PADDING/lib -Wl,-rpath-link=/home/guilhermebrant/Qt/5.1.1/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libaccelbubble.so main.o qrc_accelbubble.o -L/home/guilhermebrant/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a -L/home/guilhermebrant/android-ndk-r9/platforms/android-9/arch-arm//usr/lib -L/home/guilhermebrant/Qt/5.1.1/android_armv7/lib -lQt5Quick -L/opt/android/ndk/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a -L/opt/android/ndk/platforms/android-9/arch-arm//usr/lib -lQt5Svg -lQt5Qml -lQt5Widgets -lQt5Xml -lQt5Sensors -lQt5Network -lQt5Gui -lQt5Core -lgnustl_shared -lsupc++ -llog -lz -lm -ldl -lc -lgcc -lGLESv2
              20:47:14: The process "/usr/bin/make" exited normally.
              20:47:14: Elapsed time: 00:04.@

              I just noticed something I haven't noticed before. It's under the "General Messages" tab:
              @Could not read qmake configuration file /home/guilhermebrant/Qt/5.1.1/android_armv7/mkspecs/android-g++/qmake.conf.@

              This is how the settings under Android look like :

              !http://oi39.tinypic.com/2092f6p.jpg(Android settings)!

              Is there anything you find relevant there?

              1 Reply Last reply
              0
              • p3c0P Offline
                p3c0P Offline
                p3c0
                Moderators
                wrote on last edited by
                #14

                Hi,
                From the screenshot i see you are using 64 bit Ubuntu, so
                Can you go into "android-sdk-linux > sdk > tools" and make sure the 64 emulator version is executing ?
                (By Default adb executes "emulator" and it is 32 bit so just rename "emulator" to something else and rename "emulator64-arm" to "emulator". This make sure that the 64 bit arm emulator will run on deploy)

                Hope this helps.

                157

                B 1 Reply Last reply
                1
                • L Offline
                  L Offline
                  lgb3
                  wrote on last edited by
                  #15

                  Well, this also didn't work. I'm gonna try Qt 5.2 and see if I get any results. I hope I can. Thank you very much for your help anyways, p3c0.

                  1 Reply Last reply
                  0
                  • p3c0P Offline
                    p3c0P Offline
                    p3c0
                    Moderators
                    wrote on last edited by
                    #16

                    Ok. No problem :). BTW, Qt 5.2 beta is supposed to be released today as per their schedule. May be you could try with it.

                    157

                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      Pierrot
                      wrote on last edited by
                      #17

                      Hello,
                      any news on this topic ?
                      I experiment the same problem with Ubuntu 13.10 (run on Windows with vmWare) + Qt5.2 Beta 1 (official + all snapshots since Beta1) + several different recent Android devices. The device is seen ('adb devices' shows the device), the build in Qt Creator is OK, but when trying to deploy I cannot see the device. On the same computer, with Qt Creator on Windows the device appears when deploying and it can be run on device.

                      1 Reply Last reply
                      0
                      • L Offline
                        L Offline
                        lgb3
                        wrote on last edited by
                        #18

                        I've been able to deploy to an Android device of API Level 16, but not for Level 10.

                        The problem was that my project name contained a dash in its name (like hello-world, for instance). When generating the Java files to deploy for Android, Qt creates a package with the name of the project in it. This generates a compilation error, because dash is not allowed character in a Java Package name, but the error is not that transparent because it is in a Qt internal file. This bug should be resolved by Qt.

                        It still doesn't work for API Level 10, however, neither on real device nor on an emulator.

                        1 Reply Last reply
                        0
                        • p3c0P p3c0

                          Hi,
                          From the screenshot i see you are using 64 bit Ubuntu, so
                          Can you go into "android-sdk-linux > sdk > tools" and make sure the 64 emulator version is executing ?
                          (By Default adb executes "emulator" and it is 32 bit so just rename "emulator" to something else and rename "emulator64-arm" to "emulator". This make sure that the 64 bit arm emulator will run on deploy)

                          Hope this helps.

                          B Offline
                          B Offline
                          Bigmat
                          wrote on last edited by
                          #19

                          @p3c0 thank you :-) your post save my day !

                          Qt/C++ and Android Developer

                          1 Reply Last reply
                          0

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved