Qt5.2.1 Android Windows7
-
I just install Qt5.2.1 for Android under Windows 7 ,and android sdk ,ndk,adt ,jdk are installed correctly. And the code is compiled OK. But somthing hanppend ...like this:
Error while building/deploying project QAndroid (kit: Android for armeabi-v7a (GCC 4.8, Qt 5.2.1))
There is no compatible device.. -
If you want to deploy and run your code on an Android device you have to provide that device; either as a real device connected to your Windows 7 machine via usb or as a virtual device running as an emulation on your Windows machine. Either way, the device has to have the CPU appropriate to the target that you specify when building your Qt app.
I guess that either you have no device available or if you do then it does not match the machine code that you selected to generate in Qt.
If you want to use a physical device then you need to set it up in 'developer mode' so the comms to Qt is available. Otherwise use the Android Virtual Device Manager to create a virtual device.
-
I confirm the problem. Tested on 2 different workstations.
Unistalled Qt 5.2.0 and installed Qt 5.2.1.
Updated from adt-bundle-windows-x86_64-20130917 to adt-bundle-windows-x86_64-20140321
from android-ndk-r9 to android-ndk-r9d
from apache-ant-1.9.2 to apache-ant-1.9.3
and when I press the "play/run" button a form appears listing all the virtual devices as incompatible. I didn't test with a real device....I will try to open a bug.
-
I also got this message in "General message" panel
Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.
Could not read qmake configuration file C:/Qt/Qt5.2.1/5.2.1/android_armv5/mkspecs/android-g++/qmake.conf. -
I donìt think I need to set that env variable... I didn't set before and it worked...
I opened this bug report:
https://bugreports.qt-project.org/browse/QTBUG-380641As you can read in the bug report, I set the SDK pointer to the old SDK and it is back working.
-
-
bq. "The NDK is a toolset that allows you to implement parts of your app using native-code languages such as C and C++. For certain types of apps, this can be helpful so you can reuse existing code libraries written in these languages...
suggests the NDK is required because we want to use the Qt libraries and nothing will run without it.
Maybe one of your setups has it implicitly located on the search path so it doesn't complain that it can't find it but with the second setup the search path is slightly different and so it needs that explicit env var?
-
Ni Martyn, NDK is required and installed. There is a place in Qt Creator configuration where you set its directory path. The env variable should not be necessary.
It seems to be a problem of the new SDK (released on March 21):
https://bugreports.qt-project.org/browse/QTBUG-38064 -
I believe there is an incompatibility between the latest Android SDK and Qt 5.2.1. My suggestion : downgrade the Android SDK to version 22.3. I had similar building issued with Android (Qt 5.2.1 for MacOS) and solved them with the following procedure :
-
I am using the latest Android SDk 22.6.2 with Qt 5.2.1 on windows without any problems (android-ndk-r9d and apache-ant-1.9.3)?
The only problem I had forever is that I can't get x86 android builds to work, the app is just crashing.. but arm builds work fine!? -
I think is not the version of Android SDK. When I switch to the API14(4.0.0) ,the problem still exists. So I try to connect my Android Phone to the computer ,I found that there is a compatible device listed,but these virtual devices created earlier were still incompatible. And there is another problem, I packed my program into *.apk and instll it to my phone, it seems to be stranger ,for the running result is not the same with the desktop program ,such as : I set the gui element(like QPushButton) to alignment with the top of the Widget, it is correct in desktop program ,but is not correct in Android program. Why is that?
-
can you provide some screenshots?
In most cases the alignment will be different because of the layout container and smaller spaces on mobile phones it might not fit on the screen or I don't know with any specifics.
My apps look exactly the same on all devices, so I have no idea.