简体   繁体   English

为什么有一些java库被保留在android sdk之外?

[英]Why have some java libraries been kept out of android sdk?

All java libraries are not present within android eg javax.script, java.awt.* etc. It makes it very difficult to use a lot of useful libraries written in java (eg libraries for java script evaluation, image processing, etc.). android中不存在所有Java库,例如javax.script, java.awt.*等。这使得使用许多用Java编写的有用库(例如,用于Java脚本评估,图像处理等的库)非常困难。

I am just curious, would anyone have an idea as to why android team has decided to keep these out of android sdk? 我只是很好奇,有没有人知道为什么android团队决定将这些保留在android sdk之外?

This article might provide some basic explanation: 本文可能提供一些基本说明:

Google's mobile phone platform, Android, supports a relatively large subset of the Java Standard Edition 5.0 library. Google的手机平台Android支持Java Standard Edition 5.0库的较大子集。 Some things were left out because they simply didn't make sense (like printing), and others because better APIs are available that are specific to Android (like user interfaces). 有些东西被遗漏了,因为它们根本就没有意义(比如打印),还有其他东西,因为有更好的API可用于Android(如用户界面)。

I think that other reasons might include the fact that the mobile platform does not have the computational resources that other devices such as laptops and desktops might have (even though this seems to be changing with the introduction of high end mobile phones). 我认为其他原因可能包括移动平台没有其他设备(如笔记本电脑和台式机)可能拥有的计算资源这一事实(尽管随着高端手机的推出,这似乎正在发生变化)。

Edit: I think that the concept of 'usefulness' varies, so what yourself find useful might not be so for other people. 编辑:我认为“有用性”的概念各不相同,所以你自己觉得有用的东西对其他人来说可能并非如此。 If you want specific reasons why this specific package was left out, it is of my opinion that you are asking it in the wrong place. 如果您出于某些原因而忽略了此特定程序包,我认为您在错误的位置提出了问题。 With regards to this specific package, the javax.script , you might want to consider taking a look at this previous SO post which proposes an alternative. 至于这个特定的包, javax.script ,你可能要考虑考虑看看前一后SO其提出的替代方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何解决“由于某些许可未被接受,无法安装以下Android SDK包”的问题? - How to resolve the issue “Failed to install the following Android SDK packages as some licences have not been accepted.”? 某些变量可能尚未初始化? 为什么? - Some variables might not have been initialized? Why? 调试Android SDK库 - Debugging Android SDK libraries 为什么Android SDK包含软件包? - Why does the Android SDK have packages? 我一直在对 android 的 SQLITE 数据库进行一些编码,如何在 DatabaseHelper.java 中编写 Where 子句语句 - I have been doing some coding on android's SQLITE Database , how to write Where clause statement in DatabaseHelper.java 即使已包含导入,为什么仍找不到某些方法? - Why are some methods not found, even though imports have been included? 为什么编译一些没有调试信息的java库 - Why are some java libraries compiled without debugging information 为什么核心库中有些java方法以数字结尾? - Why some java methods in core libraries end with numbers? 是否有任何FOSS库是由于从Android剥离纯Java代码而导致的? - Are there any FOSS libraries that are the result of ripping bits out of Android for plain Java? 导入Android源中存在的某些Java文件时,为什么会有“错误找不到符号”错误? - Why i have “error cannot find symbol” when importing some java files that are present in android source?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM