Qt5 for Android: incompatible ABI - android

I recently installed Qt5 and works like a charm for API 17 and armeabi-v7a.
But I added second AVD with other parameters (of course, I installed packages in AVD settings). Now, I can't compile first project and new project for API10. When check any toolchain (armeabi or armeabi-v7a), window for choose AVD says that I don't have compatible AVD (in message displays that AVD supports default/armeabi or default/armeabi-v7a).
Anyone know how I can repair this? I think that problem is with "default/"...

There seems to be another workaround for this problem:
In QtCreator -> Projects -> BuildEnvironment add the variable
ANDROID_TARGET_ARCH=default/armeabi-v7a
Then the AVDs are shown as compatible.

It turns out that this is indeed a changed behaviour in the latest version of the Android SDK, where it lists AVDs with prefixed tag information. So instead of armeabi-v7a it's returning default/armeabi-v7a, resulting in QtCreator complaining that the ABI is not supported.
Here is the QtCreator bug report: https://bugreports.qt.io/browse/QTCREATORBUG-11658
You can either wait for a new QtCreator to be released after the patch goes in (it's being reviewed at the moment), or you can try to downgrade your Android SDK Tools from version 22.6 to something that reports only ABI: armeabi-v7a instead of Tag/ABI: default/armeabi-v7a when you execute android list avd

Spent some time figuring out how to downgrade from Android SDK Tools 22.6. Here's how to downgrade:
Download Android SDK Tools 22.3
Rename tools-folder to tools-22.6 under SDK (eg. ~/adt-bundle-linux-x86_64-20131030/sdk/tools)
Extract the downloaded tools to above path

Related

Error building Qt app for Android with Qt Creator

When I tried to build QtFireExample with my QtCreator, failed with below error message.
The installed SDK tools version (26.1.1) does not include Gradle
scripts. The minimum Qt version required for Gradle build to work is
5.9.0/5.6.3 Error while building/deploying project QtFirebaseExample (kit: Android) When executing step "Build Android APK"
My android studio is 3.2.1. And SDK tools 26.1 is also installed.
qt version is also above 5.9.0
What I did mistake?
❯ qmake --version
QMake version 3.1
Using Qt version 5.12.0 in /usr/local/Cellar/qt/5.12.0/lib
There's more steps to follow before you can deploy your first Android app using QtCreator. Installing SDK tools is not enough. Here is what I did, I'm using Windows, but hopefully the steps are the same under Ubuntu.
Install QtCreator using the link provided by Hitokage, include QtCreator (I got version 4.8.0), and Qt 5.12.0 binaries for your platform + needed Android (armv7, x86...)
Get JDK 1.8.X.X
Get NDK r18b (or a more recent version)
Get SDK tools 26.1.1 (what you already did)
SDK tools itself is not enough, some SDK modules must be installed, from SDK tools folder, run:
sdkmanager platform-tools
sdkmanager build-tools;28.0.3
sdkmanager extras;google;usb_driver
sdkmanager platforms;android-22 (which is enough for me, you may want something different based on your target Android devices)
Then open QtCreator, Go to "Mobile devices" (my french version calls it "Appareils mobiles"), then make it point to installed JDK, SDK, NDK, clic Apply and then kits should be automtically created. Now you are ready to compile and deploy and Android app for API 22.
Note that gradle is automatically downloaded by QtCreator first time you'll request a deployment.
I have tried downgrading the SDK Tools which didn't work. What worked for me however was downloading the official QT installer (working on Linux), installed QT to a new directory along with ARM64-v8a and ARMv7 (which probably solved the problem, I didn't have that in the package I installed from Arch repo). Now I can (after allowing the developer and debug mode on the device) deploy the app on the phone.
EDIT: Then chose one of those auto-detected kits.

Qt with android 5.9.0 installation erorr

I am trying to install Qt with android , but i am facing issues while adding AVD,
sdk location : D:\android-sdk
ndk location : D:\android\android-ndk-r15c-windows-x86_64\android-ndk-r15c
creator showing it found 10 tool chains for this ndk
ant location : D:\Apache-ant-1.9.6\src\script\ant.bat
whenever i try to start avd manager i am getting a pop message like as below
AVD manager tool is not available in the installed SDK tools(version 26.0.2). use the command line tool "avdmanager" for advanced AVD management.
and if i try to bulid sample project i am getting error like as below
Error while building/deploying project test (kit: Android for x86 (GCC 4.9, Qt 5.9.0 for Android x86))
When executing step "Deploy to Android device"
if anyone knows what's wrong, kindly help me to solve this problem.
i am using Qt 5.9.0 with Qt creator 4.3.1
Thank you.
The Problem here is that Google removed/moved a bunch of tools from Version 26 of the android SDK! This happend after the release of Qt 5.9.0, and thus the SDK 26 cannot be used with Qt 5.9.0
You can now either use the SDK Version 25, or update your Qt to 5.9.1. This should at least fix the build problems.
If you decide to update Qt, this will however still not solve the AVD problem. As of SDK 26, the AVD graphical tool is no longer part of the SDK, only a command line tool (as stated by the message you see). The graphical variant is available in Android Studio only. (Don't ask why, just google being google...)
You can still use that command line tool though. Go to <android-sdk-location>/tools/bin and type avdmanager --help to see how to use the tool to create virtual devices.
EDIT: With the recent QtCreator, a graphical SDK and AVD manager have been embedded into QtCreator itself, providing a useful alternative to the old ones.

Visual Studio 2015 Xamarin aapt.exe error package resources do not exist

I get a aapt.exe exited with code 1073741819 error when I try to build a new blank android app in VS2015 Community Edition.
Also a file obj\android\bin\packaged_resources does not exist error.
I have changed nothing and this happens.
I've tried looking this up and have found about:
Changing the output verbosity to Diagnostic [Doing this has not yielded anything useful that I can understand]
Ensuring all concerned files and directories contain no spaces or any special characters/symbols.
Installing all the latest Android SDKs.
The solutions I've been able to find (which usually include checking names of files and directories along with re-installing Visual Studio all together) do not resolve the issue. I have also tried Repairing VS to no avail as well as re-running the Xamarin for VS installer which also had no effect.
I would rather leave re-installing VS entirely as a last resort since it is a large download (+20GB).
-EDIT-
Most threads I've looked up talk about resolving erroneous syntax, missing parameters, calls to variables that were not declared, incorrect id tags, spaces or dashes in filenames etc. All usually in xml or layout files.
That is not the case for me. I get these errors as soon as I create a new project. I've checked the default code and it does not seem to have any errors in and of itself.
What is also a common remedy is to set output verbosity to 'normal' or 'diagnostic'as doing that would usually point out the culprit (often a syntax error). This has not worked for me either
Also I am up-to-date with SDK packages.
Remove SDK 24 using the Android SDK Manager. Technote on this exact issue here - https://releases.xamarin.com/technical-bulletin-android-sdk-build-tools-24/ . Totally removing "24" from my machine cleared it. Just changing targets did not.
From android SDK manager just make sure that at least one Android SDK Build Tools for your used API is installed
for example for version 22.0.1 , check the below image
I know this question is ancient, but I stumbled on it earlier today with a nearly identical problem. The answers and comments got me nearly all the way to a solution, and since this never seemed to wrap up neatly I thought someone might benefit from my flailing.
I'm pretty new to Xamarin and most other things programming and this is my first Stack answer, so my apologies in advance if I'm off base or out of bounds with anything.
Since it appeared at least some of the problem is conflicting APIs, I set the properties of the application to Android 6.0 (API 23) for compiling and targeting to simplify troubleshooting. See this screencap. This eliminated one instance of code 1073741819 right off the bat.
I then deleted everything that wasn't related to API 23 or Android 6.0 via the SDK manager. Including, rookie mistake, Android SDK Tools in the tools folder. The solution compiled error free (yay!) but my Android tools were gone...something I didn't notice until I tried to get a list of packages from the SDK Manager (that was no longer functional).
I ended up downloading a new set of command line tools from Android and placing the extracted "Tools" folder back into ProgramFiles(x86)\Android\android-sdk. This fixed my mistake with SDK Tools, and added additional packages to my "API 23 only" lineup--but the solution still builds error free.
I currently have the below packages installed per the Android SDK manager and solution builds as expected, so one can use the SDK Manager to modify the packages instead of doing full removal and reinstall of the tools folder (like I bumbled into).
Tools
Android SDK Tools : Rev 25.2.3
Android SDK Build-tools : Rev
23.0.3
Android SDK Build-tools : Rev 23.0.2
Android SDK Build-tools : Rev 23.0.1
Android SDK Build-tools : Rev 22.0.1
Android SDK Build-tools : Rev 21.1.21
Android 7.1.1 (API 25)
Sources for Android SDK : API 25 Rev 1
Android 6.0 (API 23)
SDK Platform : API 23 Rev 3
Google APIs : API 23 Rev 1
Google APIs ARM EABI v7a System Image : API 23 Rev 7
Google APIs Intel x86 Atom System Image : API 23 Rev 12
Sources for Android SDK : API 23 Rev 1
tl/dr:
The wrong combo of Android APIs installed seem to break the aapt.exe process, as does targeting/compiling in a version you don't have packages for or have conflicting packages for.
Setting application properties to a single desired Android version, and
replacing the ProgramFiles(x86)\android-sdk\tools folder with the latest download of command line tools from Android allowed it to build error free.

Error:Unable to obtain debug bridge in android studio

After updating Android Studio to 2.0 l am getting this error unable to obtain debug bridge and Android Device Monitor does not open. Anyone faced this error before?
I just open sdk manager and installed all android sdk tools and done.
Check whether you need to install "Android Sdk Platform Tools" in the Android SDK Manager.
Somehow, after installing Android Studio from the bundle (for Linux) I lacked the "platform-tools" directory in "Android/Sdk", where the adb executable resides. Installing the platform tools helped. It was easier to find in the standalone sdk manager.
This is because you deleted the adb.exe (it might be your antivirus who deleted it),that resided in the platform tools in the android sdk folder.
What you need to do is to delete the current platform-tools in the sdk manager program and re install it all over again.
I installed the right sdk version that matched my virtual device android version
I am also running the same problem when update android studio from 1.4 to 1.5 stable version. When I run adb command from terminal then i found following error :
bash: ./adb: cannot execute binary file: Exec format error
After R&d I found that this error occurs due to unsupported architecture. In my case:
I am using ubuntu14.04 LTS 32-bit. I observed that after updation, lib folder under platform-tools converted to lib64. I think above error occurs due to 32-bit architecture because after updation 32-bit support removed.
For permanent solution upgrade you system to 64-bit architecture.
Quick solution is to replace the updated platform-tools folder with old one that containing the lib folder instead of lib64.
I think 32-bit architecture support for android development stopped by google for future releases. But I am not sure.
I am phase these error when updating Android-SDK Plateform-Tools 23.1 in Android SDK Manager
i am worked on ubuntu 14.04 [32bit] that is not supporting with Plateform-Tools 23.1 it is only supporting in 64bit Operating System architecture that's why downgrade my Plateform-tools 23.0
it works perfect...!!!
Go to: Android Studio Settings > Appearance & Behavior > System Settings > Android SDK:
If path for SDK are text in red, change to your SDK folder and click ***APPLY***
Open the standalone SDK manager and install the platform tools package.

Android Studio on Mac, need to use custom version of SDK

I've got a sample project for an OEM part from a Chinese manufacturer that uses a custom android.jar with some of their proprietary classes in it. The SDK is 4.0.3 API version 15 with Windows binaries for adb, etc.. I've got the project set up in Android Studio on my Mac, the classes are detected successfully, and it seems to build fine, but then it says "Unable to locate adb within SDK." I actually tried copying the mac adb binary from the regular up-to-date SDK dir but this didn't affect anything. Any ideas? I have no idea if there's anything truly "Windows only" involved here, or how to "mix and match" the parts of the SDK to get this to work.
If I choose the Custom SDK for the Module, and a modern SDK (i.e. API 22) for the Project, I can get rid of the "Unable to locate adb" error, but then instead I get "Error:android-validator: [GemvaryPortDemo] Incompatible version 14 of Android SDK Tools package. Min version is 19. Please, update it though SDK manager" presumably because the tools in the Custom SDK directory are very old.
Turns out this is, in fact, possible. I needed to copy over tools, platform-tools and add build-tools from my regular, up-to-date, mac Android SDK. Now it builds just fine!

Categories

Resources