Skip to content Skip to sidebar Skip to footer

Api Level With Jre Versions

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

Solution 1:

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.

enter image description here

Which android:minSdkVersion you should use?

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.

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.

Solution 2:

Android API level is specific to which version you are using(as in ICS, Kitkat etc). What JRE you use is independent thing.

But is it better you use the most recent JRE i.e Java 7 irrespective of what your API level target is.

It may happen that the recent API levels may use some java functions introduced in recent java versions. So again irrespective of your target API level use Java 7.

See this SO answer for more info.

Post a Comment for "Api Level With Jre Versions"