Change API 19 to 18? Xamarin Studio

I tried to develop an android app but my device is not support API 19, how can I change the API to 16? there is a solution for this problem.

+3


source to share


2 answers


There are two project options that you can change: Target Framework and Android Minimum Version .

The Target Framework determines which version of Android will be compiled.

The minimum Android version defines the lowest Android version that your application can be installed on.

The simplest solution would be to modify the Target Framework project to customize the API level your device is running on. By default, Android Mininum version is installed the same as Target Framework.



The Target Framework can be found in the project options by right-clicking the project in the Solution window , choosing Options , then under General, selecting the Build category . Then you can change the Target Framework the way you want - Android 4.1 (API 16) or Android 4.3 (API 18).

The minimum Android version can be changed in the project settings under General by selecting the Android Application category . Then you can select the "Minimum Android Version" you can choose.

If you choose a minimum Android version below your target platform, then your code will have to handle certain APIs that are not available in lower Android versions. So at runtime you will need to check Android.OS.Build.Version.SdkInt and not call the API if it is not available on the current Android version.

+6


source


you will find minSdkVersion / targetSdkVersion in build.gradle (module: app) file in Gradle Scripts Directory. Edit your build version here and then open your manifest file to sync your changes.



0


source







All Articles