更改API 19〜18? Xamarin工作室 [英] change API 19 to 18 ? Xamarin Studio

查看:289
本文介绍了更改API 19〜18? Xamarin工作室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图开发的应用程序的为Android,但我的设备不
支持API 19我如何可以改变API的 16?
对这个问题的任何解决方案。

i tried to develop application for android but my device not support API 19 how can i change the API to 16 ? have any solution for that problem .

推荐答案

有,你可能要修改两处项目选项:目标框架最小的Andr​​oid版本

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

目标框架确定的Andr​​oid版本的应用程序是违反编译。

The Target Framework determines which version of Android your application is compiled against.

最小的Andr​​oid版本决定了最低版本的Andr​​oid应用程序可以安装在。

The Minimum Android Version determines the lowest version of Android your application can be installed on.

最简单的解决将是改变项目的目标框架的目标,您的设备上运行的API级别。默认的最小值的Andr​​oid版被设定为相同的目标框架

The simplest fix would be to change the project's Target Framework to target the API level that your device runs on. By default the Mininum Android Version is set to be the same as the Target Framework.

目标框架可以在项目选择通过右键单击该项目在解决方案窗口,选择中找到选项,然后在常规类别选择的生成。然后,你可以改变目标框架是一个你想要的 - 的Andr​​oid 4.1(API 16)或Android 4.3(API 18)

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

最小的Andr​​oid版本可以在项目选项中选择在 Android应用程序类别改为在常规部分。然后有一个最小的Andr​​oid版本下拉您可以选择。

The Minimum Android Version can be changed in project options in the General section by selecting the Android Application category. Then there is a Minimum Android Version drop down you can select.

如果您选择比你的目标框架最小的Andr​​oid版本低那么你的code将需要处理不是以更低的Andr​​oid版本的某些API。因此,在运行时你就需要检查Android.OS.Build.Version.SdkInt而不是调用的API,如果它不适用于当前的Andr​​oid版本。

If you select a minimum Android version lower than your Target Framework then your code will need to handle certain APIs not being available at lower Android versions. So at runtime you would need to check the Android.OS.Build.Version.SdkInt and not call an API if it is not available on the current Android version.

这篇关于更改API 19〜18? Xamarin工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆