为什么旧的Andr​​oid手机不能运行新的API的应用程序? [英] Why old android phone cannot run new api app?

查看:105
本文介绍了为什么旧的Andr​​oid手机不能运行新的API的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个愚蠢的问题,但我真的不明白为什么。在code终于编译成字节code和应能在所有的Dalvik虚拟机跑了。而API的变化,字节code的Dalvik虚拟机应该理解或多或少是一样的。

It is a silly question, but I really don't understand why. The code is finally compiled into bytecode and should be able to ran in all Dalvik VM. While the api changes, the bytecode that Dalvik VM understands should be more or less the same.

推荐答案

由于您的应用程序不捆绑Android框架。该框架code所在的设备上。

Because your app does not bundle the Android framework. The framework code resides on the device.

这就是为什么在较旧的Andr​​oid版本中使用某些较新的API,你必须包括支持库在您的APK。

That's why to use certain newer API in older Android versions, you'll have to include the support library in your APK.

本的android.jar文件包含在你的code编译构建路径,但出口应用于APK没有的。如果它要出口的话,设备上的每一个应用程序必须捆绑Android框架,这将导致不必要的膨胀,没什么可说的安全隐患。

The android.jar file is included in the build path for your code to compile but not exported to the APK. If it were to be exported, then every app on the device would have to bundle the Android framework, which would lead to unnecessary bloat, nothing to say about security implications.

这篇关于为什么旧的Andr​​oid手机不能运行新的API的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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