简体   繁体   中英

qt for android doesn't find my physical device

I'm trying to write android applications with Qt5.1. I installed everything according to these instructions and I wrote my application and built it successfully. My problem is that when I click run on android version, instead of running the application on the device that I have connected or even asking whether I want to use the virtual device or physical device ( like eclipse does ) it just opens ADV.

I know I have connected my device properly because I can run applications I write with eclipse on my device. But not with Qt.

Can anybody help me?

Just in case you need to know I'm using the latest version of ndk and for sdk I'm using the one that comes with adt's latest version. If any other information I should provide please let me know.

thank you

I have had this problem as well, your device is not corresponding with the QT run settings. When you press run (probably in QT Creator?) it will search for devices which allow the application to run on.

There are a few possibilities when it comes to this:

  • Your device is not set up correctly:
    • run "adb start-server" and then "adb devices" in your command prompt. Does it say it found 1 device with status: "device"? If not your device probably doesn't have USB debugging enabled (you can enable this in the dev settings on your device).
  • You are building in the wrong mode:
    • Make sure you are creating a program for ARM (ARM GCC 4.7 QT 5.1 for example).
  • Deploying for the wrong API level:
    • Are you running the program on a device that supports API level 17 ? If not you can change these settings (API Level) in your QT project settings.
  • You don't have the recent API level installed:
    • Start the android sdk manager and download + install the new API's.

It worked for me after performing these steps, should you have any other difficulties feel free to ask!

Edit If these steps did not work check if your android sdk is located in a location with write permission.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM