I'm building an Android app, I'm a newbie and I was wondering what build SDK and Minimum required SDK is recommended?
Also what does each one mean?
Upto my knowledge build SDK means which Android O.S version you are building against and
Minimum required SDK means: the minimum Android O.S version you want to support.
For Example
If build SDK = 2.3.3
and Minimum required SDK = 2.2
then your application will run on 2.2 and above
Related
I ask this because, after updating my Android Studio, I found SDK has risen up in size, up to 52GBs while at the beginning it was about 101MBs. Why does it contains too large size?
Android SDK is a collection of libraries and Software Development tools. Whenever Google releases a new version or update of Android Software, a corresponding SDK is also released with it. In the updated or new version of SDK, some more features are included which are not present in the previous version. Its size depends on the components you install.
Major components:
Android SDK Tools,
Android SDK Build-Tools
Android Emulator
Android SDK Platform-tools
...
In Android Studio check what components you have installed.
To determine the Android Full SDK Download size check the following question:
How to determine Android Full SDK Download size?
I have a C# Xamarin Forms Solution in Visual Studio 2019 that was created from the Xamarin Forms Template.
When the Android version (Target Framework), (found in the 'Application' Tab of the properties Window of the Android project) is set to either
1) Android 8.1 (Oreo)
2) Android 9.0 (Pie)
then my app works great on a phone running Android 9.0
However, as soon as I change it to 'Android 8.0 (Oreo)' then Visual Studio generates errors and warnings. Here is an image of them:
The reason I think I need to change the Android version to 8.0 is so that I can use the app on Android phones with this version. When I try to install the APK file (built targeting either 8.1 or 9.0) on an 8.0 Android device then the app does not work.
The error suggestion to "..increase the $(TargetFrameworkVersion)..." seems odd considering I am trying to target a lower version.
I should point out that I have all the Android SDK's installed for 8.0/8.1/9.0 and all the Android SDK Build Tools.
What am I doing wrong? I am wanting to target Android 8.0 (Oreo).
I am very new to Xamarin.
You only need to change the Minimum Android Version to run on lower API versions. Make Target Android version higher (to version 9) and Minimum Android Version to a version which you would like to support (maybe version 6). Also note that if you have any android support libraries or Xamarin.Forms, those also have a minimum build version. You have to target equal or higher version to build with those. Another thing you have to check is Supported Architectures (Properties-> Android Options -> Advanced -> Supported Architectures). Make sure it checked the architecture of the device that you try to deploy
I'm new to android and i want make some things clear about some confusions:
If i set my new android application to a minimum sdk version to 4.0.3 (api 15) should i install all sdks between that version and the latest one ? Or should i just install the sdk level same the device/emulator i will use for testing has as plateform version?
What about when i will generate the final apk for the appstore which will be supposed to work in all android platform versions starting from the min sdk i've targeted ?
i was reading about the Android Support Library and i guess it should be always part of the latest sdk. if i use it on my application should i still have earlier sdk versions installed for the compilation ? Won't i never need anymore packages from earlier API version once i use the support library ?
Best regards.
You do not need the SDK for the minimum version. You only need to work with the SDK of the Target/Maximum version.
Download the platform tools and platform through the SDK manager for the Target API version. And if you use features that are not available in the minimum version, use Android Support Libraries.
The purpose of setting your Minimum SDK is to let devices know if they'll be able to run the code based on what SDK they're using. You don't need to have all versions of the SDK, just the most recent one that you're developing for. If you're using Android Development Studio, it will warn you if a feature you're trying to implement is not supported by the Minimum SDK you've set for the project.
I have recently updated my phonegao version to 3.3.0 and when I create and build a new project with Phonegap in Android the project builds using my highest Android SDK version (Android 4.4 - API 19 in my case), but I want to build my phonegap 3.3 projects using Android 4.4.2 version (API 17).
Any ideas about how to perform this action?
Thanks a lot in advance!
So you do not want API 19 in your project, It means you want your project to run upto android version 4.2.2 only.
Make following changes in your config.xml
<preference name= "android-minSdkVersion" value="7"/>
if you want restriction on versions then you can include target version as
targetSdkVersion="17"
if you dont include target version then there will be no restrictions.
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.