与JRE版本的API级别 [英] API level with JRE versions

查看:363
本文介绍了与JRE版本的API级别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

确实 JRE 1.7 随着Android的所有API层面开展工作?
我想通过这种局面,使一个应用程序:

Does JRE 1.7 work with all api levels of android? I want to make an app by this situation:

<uses-sdk
    android:minSdkVersion = "7"
    android:targetSdkVersion = "19" />

这是确定与 JRE 1.7 ?或者我需要使用 JRE 1.6

我怎么可以算出来的API级别与JRE版本兼容?

How can I figure this out which API level with which JRE version is compatible ?

推荐答案

核心Java库 Android的运行时间的一部分(见图片下面层),但是从开发商角度不要紧。你可以做什么,不能做的是依赖于你在项目中使用的Andr​​oid SDK级别。

The core Java libraries are part of the Android runtime(see image below) layer, but from developer point of view it doesn't matter. What you can do and cannot do is tied to Android SDK level you use in your project.

其中安卓的minSdkVersion 你应该使用

Which android:minSdkVersion you should use?

您可以检查Android文档。对于每一个指令/
  命令/方法/属性,在右上角,你会发现API
  在此您可以访问级别上述财产。点击
  API级将带你到其中包含一个表的网页
  翻译API级别到Android版本。

You can check the Android documentation. For every instruction / command / method / properties, at the top right you'll find the API level at which you are able to access said property. Clicking on the API level will take you to a page which contains a table that translates API level to Android versions.

作为一般原则安卓的minSdkVersion 尽可能低。当您使用不受这个水平的支持的东西,你会得到一个编译错误。通过这种方式,你可以,你可以支持的最大用户。请参见了解详细信息。

As a general principle set android:minSdkVersion as low as possible. You will get a compiler error when you use something not supported by that level. This way you can support as many users as you can. See this for details.

这里是推荐阅读关于这个问题的。

Here is a recommended reading on this subject.

这篇关于与JRE版本的API级别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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