Why is it, that android apps are required to run inside a VM(dalvik/art)?

227 views

is this OS level restriction?

if so why did android decide to go this route? also why java? c# is also platform independent

​

another stupid question if there were a jvm implementation like dalvik or ART on iOS would the programme compiled for android run-on iOS?

if so, can anybody create said implementation or can it only be provided by apple?

In: 0

3 Answers

Anonymous 0 Comments

The premise of your question is not entirely accurate. Android allows you to write parts of application in C and C++. Native code runs outside of the VM but inside the security sandbox. Google could provide a full C/C++ SDK but they clearly wanted and still want to keep majority of Android apps architecture-independent.

Google said availability of 3rd party libraries in java around the time Android was designed was the motivation to use java.

You can implement an Android compatible virtual machine on iOS but you can’t implement all Android APIs without Apple support.

You are viewing 1 out of 3 answers, click here to view all answers.