0

I understand Android is build using the Java programming language. With different types of Java versions come different features/fixes/bugs etc. I am developing with a minimum SDK of 4.4. The thing I still don't understand is when I package this app which version of Java will run it? Does my app use the java version which I used to develop to run my app on all devices, does each sdk use it's own Java version, or something completely different?

user2924127
  • 6,034
  • 16
  • 78
  • 136
  • 1
    There's no Java code running on an Android device, so are you talking about what version of Java your code is compiled with? – ianhanniballake Mar 27 '17 at 00:48
  • @ianhanniballake I guess so then? For example the Java class HttpURLConnection had some improvements done from Java 6 to 7. One fix is very important to me which only works in Java 7. This is why I want to make sure when I develop for devices running on older SDK's that the HttpURLConnection from Java 7 is used. – user2924127 Mar 27 '17 at 00:51
  • Possible duplicate of [How does Android's Java version relate to a Java SE version?](http://stackoverflow.com/questions/7535385/how-does-androids-java-version-relate-to-a-java-se-version) – EJoshuaS - Stand with Ukraine Mar 27 '17 at 04:11

1 Answers1

0

Related: How does Android's Java version relate to a Java SE version?

Short answer is that Android uses its own version of Java, which doesn't exactly correspond to the current Java version. For example, Android currently supports all of Java 7's features, but only a subset of Java 8 features.

Furthermore, Android does not use the Java Virtual Machine. It used the Dalvik virtual machine until 4.4, and current versions use Android Runtime.

Community
  • 1
  • 1