Qt for Android. 'Deploy to Android device' error!!
I have an error while deploying a simple program with Android emulator
I follow step by step some guides but the error still exists.
the compile output
@17:08:06: Please wait, searching for a suitable device for target:android-18.
Error while building/deploying project AndroidTest (kit: Android for arm (GCC 4.8, Qt 5.1.1))
When executing step 'Deploy to Android device'@
can anyone please help me?
Are you able to start AVD from "Start Android AVD Manager" > "Your Created AVD" > Start ?
Yes, i dont think that the problem is with AVD. When i try to run my code, the AVD start and the only thing you can see is the start locked screen of the Android and not my program
Ok. How did you add the AVD ? Because i see some thing "API 5085820" in AVD target, instead it should be API-14 or API-17 or API-18
i will sent you exactly what i have done until now..
I follow some installation instructions where i found in the Internet (if you want i will sent you the links)
i change the settings in Qt creator, just like the image below
- I create a new Android project and i put just a button to show if everything is ok
- if i select Desktop to run, the 'Application Output' error is..
@Executable C:/Qt/Qt5.1.1/Tools/QtCreator/bin/build-AndroidTest1-Desktop_Qt_5_1_1_MinGW_32bit-Debug/debug/AndroidTest1.exe does not exist.@
- And When i choose the Android and i am trying to run it, i have the following errors...
'Issues' @Cannot deploy: no devices or emulators found for your package.@
'Compile Output' @Error while building/deploying project AndroidTest1 (kit: Android for arm (GCC 4.8, Qt 5.1.1))
When executing step 'Deploy to Android device'@
But the AVD starts in the locked screen of Android
- In 'General Messages' tab i have the this Output
@Could not read qmake configuration file C:/Qt/Qt5.1.1/5.1.1/android_armv7/mkspecs/android-g++/qmake.conf.
Could not read qmake configuration file C:/Qt/Qt5.1.1/5.1.1/android_x86/mkspecs/android-g++/qmake.conf.@
I post one more photo from 'Projects'
I don't think so I change something in this place, but i believe that in the red frame is not correct
It seems that you donot have the mingw32 compiler installed. Download it and install to C:\MingW.
If you have downloaded individual packages, you need to make sure that mingw32-make is in the PATH environment.
Then compile the application.
I just got a simple Qt app to launch in the Android emulator, so I hope these comments will help others.
I am using the Android bundle
...and the latest NDK
and everything is 64-bit.
As I installed under "Program Files", I made sure that paths and Env Variables use the Progra~1 format (that was tilde) to avoid problems with spaces.
The Qt versions look like this
the Build settings are then
Setting up the Kit as,
I created an AVD for Android-10 - I think that may be the only one definitely supported. Choose a small screen cause it is quite slow.
I started the AVD and waited for it to finish launching in the emulator.
Then I "Deploy Project guyhello" from the QtCreator drop-down menu.
Here is the report from the "Compile Output"
and finally for completeness, here was the app code
int main(int argc, char *argv)
QCoreApplication app(argc, argv);
QPushButton button("Hello morons!");
button.show(); return app.exec();
- The App shows up in the grid on the emulator, and clicking it briefly shows a banner before crashing.
Always one more bug to find....
i almost solve my problem...just download and use this version of Qt..
you dont need to change the settings just a simple install.
The emulator still not work but i test my code on my tablet.
While i have connected it with my Pc the program starts running on tablet.
Necessitas uses Qt4 so you would not be able to use the Qt5 features. Also Qt5 is the official port for Android.
In my previous report, the app was deployed but gave a blank screen when launched. I think the issue relates to the ABI for the shared library libguyhello.so which is in a folder
The default AVD using Android-10 seems to only recognise the basic armeabi and I could not find a way of generating that.
So I created a new AVD with Android-18 and changed the run settings to match.
Always start the emulator first and let it fully initilaize before trying to deploy the App.
Then it works!
I was also able to debug and stop at a breakpoint.
zing0000.. could you post the guide that you follow and install Qt5 with Android, because i think that i tried a lot and i follow many guides without result
And if you want give us some prt scs from the settings that you change.
Thanks in advance!
p3c0.. i am new in Qt family, i have almost one month that i am working with Qt. I am student and my dissertation is about Qt with android.
I tried to install Qt5 but as i already told you i couldn't start the emulator and test my code.
The necessitas version of Qt, i think so, make things look simply, just install and nothing have to change, connect the android device and run the code.. :)
Try and identify where the problem lies. For example, I use
Qt5.1.0 - simple install
Android SDK - I use the bundle which includes eclipse. Pre-requisites are Java JDK (not JRE). Be consistent, either 32 or 64-bit.
Android NDK - just unzip. Pre-requisites are Python and Cygwin.
here are some notes I made about cygwin for my own use.
- (2013) execute setup-x86_64.exe at cygwin website.
- search for "make".
** Get GNU make 188.8.131.52 (for Android NDK).
- toggle selections. Only need 'bin'
- hit 'next' to download. Takes a while, more than 5 minutes, lots of small files
It is a complex environment to build, but I definitely agree with p3c0 that all the good stuff is in Qt5. That's where you need to be!
I follow the advice both of you. I install Qt5.1.1, I set the SDK and NDK path. correctly, I download and install cygwin from website (I didn't understand what do you mean and instructions about "make")
but the problem still exist...
if you see my last prt sc above, it is exactly what there is in my Project's settings
and the error now is..
@00:41:29: Starting: "mingw32-make"
qtcreator_ctrlc_stub: Command line failed: mingw32-make
00:41:29: The process "mingw32-make" exited with code -1.
Error while building/deploying project Test (kit: Android for arm (GCC 4.8, Qt 5.1.1))
When executing step 'Make'
do you have an idea about this...
I think so I understand what you mean about "make"
So, I install this version but nothing good happen!! :( :(
the same error!