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.
Related
I'm having trouble with the Android emulator.
I am running on Windows 10, and here is my environment:
Microsoft Visual Studio Professional 2017
Version 15.5.6
VisualStudio.15.Release/15.5.6+27130.2027
Microsoft .NET Framework
Version 4.7.02556
Xamarin 4.8.0.760 (fc93f3f5b)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 4.8.188 (c5813fa34)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin.Android SDK 8.1.5.0 (HEAD/75f8c6838)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 11.6.1.4 (db807ec)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
My Android SDK Platform looks like:
and the SDK Tools is:
In my emulator screen, no matter what device I choose, I get the error:
"No system images installed for this target".
I clearly have installed the Google ARM System Images.
I don't understand why I'm getting the error message.
Any help will be greatly appreciated.
Charles
Update 2
I would like to thank York Shen, and Jon Douglas for their help. The Device Emulator now works... well almost.
I installed the Intel HAXM Emulator Accelerator. My console script was:
I also selected the Accelerator from the SDK Tools:
When I try to define a new device using the Emulator Manager, I now get:
Obviously, I still have a problem with HAXM. By the way, if you tell me I have to change my computer's BIOS to make HAXM work, I will give up on Android.
I tried to run a default emulator, and it warned me that I could continue, but without any acceleration. A simulator appeared but my application did not run. My application only runs on iOS and UWP.
I'm going on five days in trying to get the Android Emulators to work. No cigar. I contrast this to my experience with the iOS Emulator. That one took me about 1/2 an hour to get running. It was very clean and simple. I'm thinking seriously about abandoning all software development for Android.
Why am I getting: “No system images installed for this target”
As #Jon Douglas said, you are using a deprecated version of the AVD Manager, you could refer to the docuemnt:
As of Android SDK Tools version 26.0.1, Google has removed support for their UI-based AVD and SDK managers in favor of their new CLI (Command Line Interface) tools.
You could refer to my answer for a more detailed answer about how to solve this issue:
Xamarin with Visual Studio not detecting CPU/ABI system image for emulator, even though system images are installed
Update:
If you use the Xamarin SDK Manager and Xamarin Android Device Manager, you need update to Android SDK Tools 26.0.1 and later (which is required for Android 8.0 Oreo development).
You could read this: Requirements. In your situation, upgrade your Android SDK Tools version to 26.1.1:
Update 2:
You need Installing the Xamarin Android Device Manager, then you could start the Device Manager by clicking Tools > Android Emulator Manager:
To help anyone scratching their heads as to why when they install a new version of Visual Studio 2017 the emulator looks different to York Shen above, its because Visual Studio didn't bundle the latest version of the AVD Manager into Visual Studio 15.6.6 (as of 23rd April)
I followed #York Shen - MSFT's answer until I hit a snag on the update of the Android SDK tools. I simply downloaded them from https://developer.android.com/studio/#downloads (Command line tools only, sdk-tools-windows-4333796.zip).
Copy the contents of the tools folder into C:\Program Files (x86)\Android\android-sdk\tools
AVD Manager in my android studio was working fine, until an unexpected shutdown caused AVD Manager to act weird. Now I can't run any AVD's.
When I click any system-image it says unknown error under recommendation. When I click finish it says:
An error occurred while creating the AVD. See Idea.log for more details.
Here are the screenshots:
I was able to solve this using this solution.
[Delete] *.ini files from a directory home//.android/avd It's for
Ubuntu. In Windows it's also in the user's folder (.android/avd).
I deep dive into this issue and found the following solution.
There was a problem to run mksdcard sdk tool. Some SDK tools such as mksdcard.exe require Microsoft Visual C++ runtime. So go to your System properties and check your System type:
Then based on your system type,(for me it was x64) download/update the latest Microsoft Visual C++ Redistributable for Visual Studio 2019 from the link https://visualstudio.microsoft.com/downloads/
After installing Microsoft Visual C++, the problem was fixed. Also the Unknown error problem was fixed and I was able to create the avd successfully.
The problem resolved by reinstalling android studio
First, go to control panel,
Remove, if exists Microsoft Visual C++ 2015 Redistributable package x86 or x64,
Then, go to this link, https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170
download Visual Studio 2015,2017,2019,2022 latest package x86 and x64 version. Install two version then,
restart pc,
Error is gone...
I know that this is a pretty basic question. But I am new to native android development and I am having trouble wrapping my head around what is what.
I am using the Android Standalone SDK and not using Android Studio so please guide be accordingly.
Let's say that I want to build my app for API level 19. what level of platform tools and build tools do I need to install.
This is what I have currently
As I want to build for API 19, which I have installed. Do I need to have version 19 of Android SDK build tools or they can be higher?
Kindly please explain to me what each term means as well in laymen's terms.
-Thanks
Build-Tools is a component
of the Android SDK required for building Android apps. It's installed
in the /build-tools/ directory
So, build tool is to build your android app. That is like the makefile for C projects. Output is an APK file.
Android SDK Tools is a component for the Android SDK. It includes the
complete set of development and debugging tools for Android. It is
included with Android Studio.
So, Platform tool is where all the tool to interact with the android device you have, such as fastboot and adb. For example, to install your apk into the devices, run it, debug it, and grep some file from it, you need to first connect your device to adb bridge and run all those command on it.
Let's say that I want to build my app for API level 19. what level of
platform tools and build tools do I need to install.
Basically, you should have all the latest thing here. If you are deploying for a API 19 device, you should also have the Android SDK platform 19.
I haven't touch those things in a while, because I install all those things anyway, so I'd appreciate correction.
Android SDK Build-Tools is a component of the Android SDK required for building Android apps. It's installed in the /build-tools/ directory. It includes the complete set of development and debugging tools for the Android SDK like emulator, sdcard, sqlite and apk builder etc.
For more details check Android SDK Build-Tools
Platform-tools are used to support the features for the current android platform including adb which is acting like a bridge to communicate with emulator or device.
You can also know more about this topic by clicking here
This may be old but i appreciate it. I build apk via the command line so I was thinking with this answer, I may not need the Platform-Tools.
By the way, we are on Android 12 already - API Level 32 :)
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
I'm on iMac with X.8.3 and i'm trying to make my test application working with Titanium Studio and Android SDK 2.2, the apps works on iPhone Simulator but not on Android.
Here is the terminal error when trying to execute the app in Android Emulator
"[INFO] logfile = /Users/*****/Documents/Titanium_Studio_Workspace/Geocoder/build.log
[ERROR] : Build process exited with code 1
[ERROR] : Project failed to build after 208ms
[ERROR] : Emulator process exited with code 1"
and the log file says the same.
I've tried the android emulator with Eclipse and it works pretty well!
On the Dashboard page of Titanium Studio the icon of Android SDK stay in Red, it says
"Android configuration details.
One or more pieces are missing from the Android SDK. It may be that the Android SDK is already installed and Titanium Studio cannot locate the directory, or it may be that some additional components need to be installed.
Items required:
An Android SDK is missing. Titanium requires Android platform 2.2.*
Add-On Google APIs version 8"
I've already tryied to remove and install it all 2 times and it doesn't change anything.
In the preferences of Titanium / Studio / Plateforms / Android it's seems to be Ok with the android sdk, the dropdown android sdk sees 3 versions of android 4.2.2 and Google API.
I just had the same problem while trying to start the Kitchen Sink app. In my case the problem was that tiapp.xml referred to and Android SDK that was not installed on my machine.
I changed the SDK version number in these lines from 11 to 14
<uses-sdk android:targetSdkVersion="14"/>
<tool-api-level>14</tool-api-level>
Another possible option would be to install the SDK version that is called in tiapp.xml.
Answer 1 :
Seems build tools got moved to another directory with the latest Android SDK update. Created symlinks to aapt and dx in /Applications/Android-sdk/platform-tools:
ln -s /Applications/Android-sdk/build-tools/17.0.0/aapt aapt ln -s /Applications/Android-sdk/build-tools/17.0.0/dx dx
This solved it for me (after some digging in their Python code).
Answer 2 :
I'm on windows so i used mklink. I had to add a link to lib/dx.jar for it to work. What I dit was first add folder 'lib' to platform-tools folder and after in command line:
cd %YOUR_ANDROID_DIR%\platform-tools
mklink aapt.exe ..\build-tools\android-4.2.2\aapt.exe
mklink dx.bat ..\build-tools\android-4.2.2\dx.bat
cd lib
mklink dx.bat ..\..\build-tools\android-4.2.2\lib\dx.jar
Answer 3 :
I copied the following files:
C:\Android\build-tools\17.0.0\aapt.exe to C:\Android\platform-tools\aapt.exe
C:\Android\build-tools\17.0.0\dx.bat to C:\Android\platform-tools\dx.bat
C:\Android\build-tools\17.0.0\lib to C:\Android\platform-tools\lib
I then cleaned the project and rebuilt and everything is now working.
Source here: http://developer.appcelerator.com/question/152497/titanium-sdk-310-error-typeerror-argument-of-type-nonetype-is-not-iterable-on-building-android-app#comment-175782
Edit your emulator so that the Target is set to Google APIs for the level you want to use.
If this happens with Kitchen Sink demo, the fix is to go into the Android SDK Manager and install "Android 3.0 (API 11)". Make sure the app uses emulator "Google APIs (Android 2.3.3)" and "WVGA854". I assume there's a Titanium bug because you have to install a higher API level (3.0) than is actually used (2.3.3).