I have been trying to deploy a simple Qt application to android but with no luck. Details are as follows
Qt Version : Qt 5.1.0 for Android (Windows 32-bit) downloaded from here
Qt Creator version : Qt Creator 2.7.2
I have set the following options in Qt Creator
Android configurations
Android SDK location : C:\adt-bundle-windows-x86-20130717\adt-bundle-windows-x86-20130717\sdk
Android NDK location : C:\android-ndk-r8e
Ant location : C:\Program Files\Java\jdk1.7.0_25
AVD name : AndroidAVD (API Level 17,armeabi-v7a)
Kit Configuration
Name of the kit : Android for arm(GCC 4.4.3,Qt 5.1.0)(default)
Device type : Android
Device : Run on Android
Sysroot : Its empty
Compiler : GCC (arm 4.4.3 )
Android GDB Server : C:\android-ndk-r8e\prebuilt\android-arm\gdbserver
Debugger : C:\android-ndk-r8e\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\arm-linux-androideabi-gdb.exe
Qt Version : 5.1.0 (android_armv7)(C:\Qt\Qt5.1.0\5.1.0\android_armv7\bin\qmake.exe)
Deploy configuration of the Kit(for both Release and Debug) :
Deploy local Qt libraries and Use Local Qt libraries option is checked
OS : Windows 7 64 bit
The Problem
When I try to build,everything builds fine. I get libTheTestApp.so in my build directory.
Also the project directory now contains a folder named "android" containing the manifest file and some other files.
When I try to Run the app, the emulator starts but I can't find my app. If I close my
emulator and return to Qt Creator I get the following error
Please wait, searching for a suitable device for target:android-17.
Error while building/deploying project TheTestApp (kit: Android for arm (GCC 4.4.3, Qt 5.1.0))
When executing step 'Deploy to Android device'
If I do "adb devices" while the emulator is running, I get the id of the running emulator
Also I tried searching the internet before posting this question here. I found this link.
My question is how do I deploy a Qt5 application to an android device? Are there any links
which say how to do it? I am asking this because I have followed the instructions provided
in Qt5ForAndroidBuilding link while building the app.
Thanks for your time.
I was successfully able to deploy a simple QT application to my android device.
From what I understand ,Qt creator first tries to deploy the app to a device if it finds one. If no device is found, it tries to launch an AVD and deploys the application to the emulator.
"Please wait, searching for a suitable device for target:android-17."
Try targeting a lower api level by changing it in Projects->Selected Toolkit -> Run -> Package Configuartion -> Manifest
And also , make sure that the Ant location points to InstallLocation\ant\bin\ant.bat
Video Build and deploy Qt apps to Android using Qt 5.1 on Windows http://www.youtube.com/watch?v=_nkhlhBwkjk.
You did not mention that whether you specified jdk location in Qt Creator or not.
for ant location, please specify the path to bin/ant.bat file from ant directory.
For people who will see this post in the future:
Do not launch avd from Qt Creator, first run the avd from android sdk manager
do not create your own avd, use the existing ones instead, as follows
go to android sdk folder, open android SDK Manager > tools > Manage AVDs...
there are two tabs at the top, go to "Device Definition" tab
select any one avd and click on "Create AVD"
from new window that comes up, select target api level, cpu/abi and check snapshot checkBox at the bottom of the window and press "ok" button.
new window comes up with the specifications of created avd, click ok
now you have a valid avd. Select it and press "start" button.
wait until the avd is lauched, unlock it and run you project.
For a good documentation on deploying to Android device:
http://qt-project.org/doc/qtcreator-2.8/creator-deploying-android.html
http://qt-project.org/doc/qt-5.1/qtdoc/android-support.html
I had the same problem. To solve it I configured the app as it is presented in the links.
Be careful to start the device emulator from Android sdk->AVD Manager NOT from Qt Creator->AVD Manager.
And check to see if ant is correctly installed by run->cmd->ant -version.
Related
I am trying to to run a application on my android device. The issue is that I get the PAClient error E0002 From my understanding profile names are only needed when running apps on Remote Devices, which I'm not doing. There are no profiles created for the PAClient and even if i try to create one the only option is Widows 64 and 32-Bit
I recently reinstalled the Android Common Files from Tools -> Manage Platforms. That could have something to do with it. I know there is another post here, but that post has no working answers.
Also here are my computers environment variables
My platform selector
So how do I fix this error?
The Answer:
The PAClient Error was caused by a compatibility issue with the device in question and the Android SDK Installed the computer.
To fix this issue go to C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\<Your Installed SDK>\ open SDK Manager.exe, remove the SDK installed (Ex: Android 10) and install the one corresponding to the Android Version on your phone (Android R Dev. Preview in my case). Then open Delphi, go to Tools -> Options -> Deployment -> Sdk Manager then change the path of the old SDKs to the new SDK path (They should have a exclamation mark next to them). Now the last thing you have to do is go to the Java Tab and change the Keytool and Jarsigner location to a valid one if its not already valid (something like C:\ProgramFiles\<your java installation>\<java jdk version>\bin\keytool.exe and C:\ProgramFiles\<your java installation>\<java jdk version>\bin\jarsigner.exe for the jarsigner).
That's all. Now you can compile & run your application on your device.
Note: You don't have to uninstall the old SDK if you still need it to make apps for other android versions. Only remove it if you don't need it.
On my Mac mini OS X 10.7.4, I have installed Android SDK which contains all API's up to level 19 (Android 4.4.2) onto the /usr/local directory (permissions set to 777) and I have Eclipse Luna (4.4.1) with ADT plugin installed and they all seem to work. When I select the 'Android Sample Project' option for platform 2.2.3 and create a Skeleton Application, it gets created and runs fine as an Android Application on my 2010 HTC Desire connected over USB debugging mode.
But when I select Android Application Project with those options:
Min required SDK: API 8: Android 2.2
Target SDK: API10: Android2.3.3
Compile with: API19: Android 4.4
Theme: Holo Dark
Create Activity: selected
The wizard hangs on after I click the finish button. The project is actually created and is available on the Package Explorer. If I return back to the first screen of the wizard, "A project with that name already exists in the workspace" is displayed. After I close the wizard and try to run the project as an Android Application, it contains many errors, here is the screenshot for clarity:
If I repeat the same steps with the Create Activity: not selected, the wizard closes and when I run it as an Android Application it says (headers truncated for clarity)
Uploading Sample.apk onto device 'SH11FRT01473'
Installing Sample.apk... Success!
/Sample/bin/Sample.apk installed on device
Done!
But I can't try or see this Sample app on my HTC device.
Need help and advice on this. Eclipse Luna is the greatest version of Eclipse for my version of OS X. Thank you.
After some searching I've noticed that the problem didn't depend on the Eclipse Luna. It was rather a problem with the Android SDK itself. Because the Android application I wanted to build was target Android2.3.3, it needed the so-called ActionBar support Library. But the Android SDK didn't contain that library and the Android SDK Manager didn't list it under the Extras folder so I had to install that library manually. I've downloaded the appropriate package from: https://dl-ssl.google.com/android/repository/support_r21.zip into my downloads folder ~/Downloads and installed it with:
tar -xvf ~/Downloads/support_r21.zip --directory
/usr/local/android-sdk-4-0-r15/extras/android/
After that, without restarting Eclipse, I created the Android Application Project without any hang-on.
I'm using VS2012 and I'm trying to build my application for Android, but APK file is not created when I build the application.
I'm doing this process using the Marmalade Hub and the "Package, Install and Run" option. Build process works fine and I get no errores, but when I process on the "Package, Install and Run" button I get the following message:
Please Build before deploying. To build, click "Build" or click "Open in IDE" and build GCC ARM Debug.
The following picture shows this process:
Picture
Please help, I cannot advance on my project because of this situation!
Thanks!
You're doing it wrong. The build process has to be in the IDE, not in the HUB. Open the project in IDE(VS2012 in your case) by either clicking Open in IDE button in Hub or double clicking the Mkb file. Build and run your code in x86 first to create the necessary bin files for groups and then build it using GCC release compiler. After that you can either run it using GCC compiler to open the deploy tool(default action for VS2010 and VS2012 desktop version) or running deploy tool from external tools (VS2012 for windows phone) or by running the deploy tool target (in XCode) directly. You can instead use package, install and run button in the hub if you've already filled the neccessary info deploy tool asked you.
Honestly I don't have trust on Hub and like to do the development using old school method with IDE and deploy tool. It always works.
I found the problem on the HUB that wasn't allowing me to run the "Package, Install and Run" process. For that matter, the actual problem was in the Package part of the process.
For some reason, when you use VS2012 to develop and you haven't installed Windows Phone for VS2012, the default option for the HUB is to check for "Windows Phone 8 C++ Development" tool installation and if not present, block Package build for Android. I also note that I'm using Windows 7, so I cannot install Windows Phone for 2012 module.
The solution I found was to simply configure Marmalade Hub correctly:
Open Marmalade Hub.
Press on Dependency Checker.
Depency Checker should start with the IDE's and Compilers tab opened. If not, open IDE's and Compilers tab.
Look for Windows Phone 8 C++ Development on the tab.
Choose "Work Without IDE" on the options.
Try to build the project again.
Best!
As the title reads, it crashes every time I make a new android app project. It seems to run fine when I make a new Java project, however. The error code i get is: Java was started but returned with exit code: -805306369.
That's all I could post, i can't seem to copy the error message (it's a pop-up, doesn't appear on console)
Just as it's about to load the project, eclipse goes Not Responding for a long time, so I'm forced to close it and I get that error message.
Any help would be appreciated, thank you.
If you're using Eclipse to build Android, do the following in order:
Install the JDK from Oracle. You can get the JDK here.
Install Eclipse (e.g. Eclipse Standard version). As of November 2013, Juno (Eclipse v4.2.2) is the most stable release of Eclipse. Refrain from using Kepler release for now. You can get old, stable release of Eclipse here. Or, new version here if it is stable. Important: When you install Eclipse, do not overwrite an existing Eclipse installed directory but instead create a new directory and install Eclipse there. This would prevent getting libraries mixed up between different versions of Eclipse.
Install the Android SDK. You can get the SDK here. For beginners, choose the installer_r22.3-windows.exe package.
Install the Android Development Tools (ADT). You can get the ADT here.
Start Eclipse.
From Eclipse's menu, select Window | Preferences. Then, select Java | Installed JREs option. Check to see if Eclipse has listed correctly the JDK installed directory created from step 1 above. If not, click Add button and browse to your JDK installed directory. On Windows, this directory is normally found under C:\Program Files\Java\jdk1.6.0_45 (e.g. Java 1.6 release 45).
In Eclipse's Preferences screen, select Android option and check that the directory of the Android SDK Location is correct. It should be correct if you have successfully completed step 3 above.
To create a new Android project, from Eclipse's menu select File | New | Android Application Project. Fill in the required information in the New Android Application screen and click Finish when done.
OPTIONAL: Under Eclipse's Window menu option, there are two Android submenu options: Android SDK Manager and Android Virtual Device Manager.
a. The Android SDK Manager option allows you to install/remove versions and/or components used for Android development.
b. The Android Virtual Device Manager option allows you to create virtual Android devices for development and testing purposes. For example, an Android virtual device with a Target of Android 2.1 - API Level 7 will allow you to test your Android application that will later run in production on devices - phones, tablets, notes - that run Android firmware version 2.1.
I've seen some questions about this, but none with real answers nor details. Here is my case:
I have an application that uses Google Maps API v2 which works just fine. Recently I found out that I cannot get it installed on this not ARM-based device.
In order to nail down the problem I'm working with Google Maps samples provided with the SDK (\sdk\extras\google\google_play_services\samples)
which gives me the same error message at install time:
Failure [INSTALL_FAILED_CPU_ABI_INCOMPATIBLE]
I get this message only on a real device using Intellij (12.1.1)
It works fine using both Eclipse on real device and using Intellij on the Emulator configured with CPU: Intel Atom (x86)
Any help would be highly appreciated!
UPDATE
As expected, same thing happens with Android Studio
By default, IntelliJ assumes that the libs folder in the root of an Android module contains native libraries, even if it just holds jars. Thus, it packages the APK making it look like these are native libraries. I just had a similar issue where my application had no native code and would work on the default emulator, but got the ABI warning when installing on the Genymotion emulator. To fix this, tell IntelliJ (or Android Studio) that your libraries are not native code:
Open File -> Project Structure.
Click Modules on the left side of the window.
For each Android module, expand the dropdown and select the Android subitem.
In the Structure tab on the right, delete contents of the Native libs directory field (you can leave it blank).
Once you've done this for each Android module in the project and applied the changes, you may need to rebuild your project for the changes to take place by choosing Build -> Rebuild Project from IntelliJ's global menu.
Latest Genymotion wont support ARM binary. If you have native code compiled for ARM, you can use the Genymotion-ARM-Translation. Just drag and drop this file to Genymotion home folder and reboot .
Reference.
http://forum.xda-developers.com/showthread.php?t=2528952.
In android studio, Fix this issue:
1 Download Genymotion-ARM-Translation_v1.1.zip
download url:
https://forum.xda-developers.com/attachment.php?s=9f1870536cb530a1346794b6ef629e90&attachmentid=2680937&d=1397258016
2 Drag the zip file into your running virtual device and click ok
3 restart Genymotion virtual device