which android studio version have Android 5.1 (API level 22)? - android

I have downloaded some projects of android apk to learn from it ..
i try to open it using the latest version of android studio (2.2.3) , but it's take too long time and then stop ,I looked for a solution to this problem and found that these applications were built on previous versions of the sdk So to solve this problem, I should use an earlier version of Android Studio, so I want to know what is the Android studio version which have Android 5.1 (API level 22).

You can have a single installation of Android Studio and all the SDKs you want to use (partially or fully installed)

You have to download the sdk via sdk manager download the latest sdk

Related

Xamarin; Android 11.0 SDK is not available in Visual Studio; Target Framework

In a computer, I have installed Android 11.0 SDK for a Visual Studio 2019 Community installation and my Xamarin Android app is compiled correctly using this SDK. The SDK was installed automatically:
Then I installed Visual Studio 2019 Community in another computer to compile my app there. But it seems the Android 11.0 SDK is no longer available:
It is not installed automatically and I cannot find anywhere to install it manually. What's wrong and how can I install Android 11.0 SDK on Visual Studio?
After long searching and none of the solutions were working for me, i've found that the SDK can also be installed with the VS Installer.
The API level 30 (Android 11) was nowhere to be found to install, nor VS SDK Manager nor Android Studio SDK Manager (the AS SDK Manager didn't even work, could not load any SDK's)
(See screenshots)
Go to VS Installer -> Modify VS version
-> Go to tab 'Individual Components' -> Search for SDK API level 30 -> Select and install
After the first login you'll probably need to accept SDK licenses again as I had to.
Hope this helps anyone who, like me, did not find any other solution working
PS: I did update VS to its latest version before doing this, not sure if this is mandatory or not since I was on 16.10 before but if this doesn't work, try updating VS itself first.
As of now Android 11 is not officially supported in Visual Studio.
So you have two options:
Select to use unofficial repositories in that dialog
Wait for the version 16.9 where it is supposed to be supported.

How to stop Android Studio 4.0 from downloading latest sdk

I just got the latest version of Android Studio 4.0 and when I create a new project it automatically downloads the Android SDK Platform 29.
I disabled updating in the settings and it still downloads that SDK.
Is there any way to disable it, or do I have to revert back to Android Studio 3.6.3?

Visual Studio not showing installed Android api levels

I am developing an Android app in Visual Studio. In the Android SDK manager, all API's from API level 23 (Android 6.0) to API level 25 (Android 7.1) are installed.
But when I open the project properties in Visual Studio, the "Compile using Android version" option is showing apis only till 23(Android 6.0). I want to target 7.1 as most of the smartphones will now have it.
There are another problem if I go with Android 6.0. Some packages like Xamarin.Firebase.Messaging fails to install with the following error.
Install-Package: Could not install package 'Xamarin.Firebase.Messaging 42.1001.0'.
You are trying to install this package into a
project that targets 'MonoAndroid,Version=v6.0', but the package does not contain
any assembly references or content files that are
compatible with that framework. For more information, contact the package author.
I can see that all options available under API level 25 are installed in SDK manager. Kindly help me so that i can target Android 7.1 from the Visual Studio Android app. Thanks
Is your Xamarin installation up to date? I suspect that your version of Xamarin.Android is 6.x which means that you won't be able to target Android 7.0 or 7.1 even if they are installed through the SDK manager. You can check the version from Help > About Microsoft Visual Studio.
For example, my version is 7.1.0.19 and I'm able to target Androd 7.1 just fine.
To check for updates, you should open Tools > Options > Xamarin > Other and click Check now.
Update for Visual Studio 2017:
If you're using Visual Studio 2017 or newer, Xamarin updates are delivered as part of Visual Studio updates. To manually check for updates, go to Tools > Extensions and Updates... In the left hand menu, open Updates and select Product Updates. If there are updates available, they will be shown on this list.
In Visual Studio 2017 preview there is an improved Google Android emulation support with a new Android emulator that's built into Visual Studio (this supercedes the Visual Studio Emulator for Android):
I checked it this morning and it had Android emulators up to API 27 including Oreo.
However, I did try to trigger API 28 P-Type even switching the SDK Manager from the Microsoft repository to the Google repository but it still didn't show up, but, at least you got everything you need up to API 27.
References:
https://www.visualstudio.com/vs/preview/
https://blog.xamarin.com/3-reasons-to-try-visual-studio-2017-version-15-4-previews/

Object reference not set to an instance of an object When I create new Android App (Visual Studio)

In a Visual Studio 2015, Xamarin, Android SDK, jdk 1.7, and emulator are installed and Xamarin has all green checked items in tools>options>Xamarin. But When I try to create Blank App (Android) VS shows an error:
Object reference not set to an instance of an object
Then new project fail to create and solution explorer will be empty.
How could I solve it?
I solved it with updated Android SDK setup (API Level 19 and 21) [3rd party] to Android SDK setup (API Level 22) [3rd party] in Visual Studio setup.
I had the same problem and when I installed Android 4.4.2(API 19) from
Android SDK Manager the issue got resolved. You can open Android SDK Manager in
VS2015 with Update 2 by navigating to Tools-> Android->Android SDK Manager
I figured out this...
Depending on the emulators you want to use with the new project, subject to what is installed using Android AVD, you will need to download the necessary API Level.
Example.
I looked up my emulators.
Then I simply opened Android SDK Manager and downloaded the corresponding API Level 19
And everything worked out well
I also encounter this problem on Visual Studio 2015 Update 2 with Xamarin.VisualStudio_4.0.3.214, but I solved it by installing level 19, 21, 22, 23 through Android SDK Manager.
I struggle with this same problem for a whole day but I got it resolved after several iterations.
Make sure Android Studio is not installed on your computer. If it is, uninstall it and run the VS2015 installer again until all Android SDK errors go away.
Make sure VS2015 is closed and install the most recent stable version of Xamarin for Visual Studio 2015. I found it here: https://store.xamarin.com/account/my/subscription/downloads. (Trying to install it through VS2015 didn't work for me under Tools -> Android -> Settings -> Xamarin for Visual Studio Updates.)
Make sure you have Java SDK version 7 installed on your machine (do not use 8 even though its the latest). You also must use the 32-bit version even if you have a 64-bit machine. This was key!
Install the Android SDK. Standalone version, not Android Studio + Android SDK.
Install the Android NDK.
Restart your computer and open VS2015. Go to Tools -> Android -> Settings and set the correct paths to Android SDK, NDK and Java SDK.
You should be good to go with creating a new project. You are all welcome!!!

is it necessary to keep older versions of Android SDK installed with Android SDK Manager?

In the Android DSK Manager under "Installed Packages", I see things like:
SDK Platform Android 3.2
SDK Platform Android 3.1
SDK Platform Android 3.0
SDK Platform Android 2.3
SDK Platform Android 2.2
SDK Platform Android 2.1
SDK Platform Android 1.6
SDK Platform Android 1.5
Is it necessary to keep the older SDKs, if I am programming with the latest SDK?
No. You dont need older packages if you are sure about developing with latest packages.
You dont need to keep those packages which your application is not using. Generally you should keep those versions installed which your application is going to use. Like your application may use version from 8 to 10. So no need to keep lower than 8. So that depends on your application which version it will use.
Its too late but I would like to share my experience.
Yes, if you are using Instant Run and using SDK 21 or higher then you should keep SDK Platforms.
For Example, if have deleted the SDK Platform 22 and testing on Android 5.1 device or emulator then Android Studio will ask you to install SDK Platform if you want to use instant run else instant run will not work.

Categories

Resources