罐之间的差异,Android的图书​​馆和Android库项目差异、项目、图书、Android

2023-09-03 20:42:23 作者:命里不缺狗°

据我了解,在三种方式分配我的应用程序都可以通过罐,Android的图书​​馆和Android库项目。

As I understand, the three ways of distributing my application are via Jar, Android Library and Android Library Project.

罐 - 不能包含资源或XML布局(所以这对我来说)

Jar - cannot contain resources or XML layouts (so this is out for me)

的Andr​​oid库 - 我真的不知道这是如何工作,但谷歌API使用它......

Android Library - I don't really know how this works but the Google API uses it...

的Andr​​oid库项目 - 包括资源,但允许在code中的客户端自由发挥,因为它是这样分布的源

Android Library Project - includes resources but allows the client free rein on the code as it is distributed as source.

如果我要创建需要可绘制,并且我要分发给其他Android程序员的XML文件的封闭源代码的应用程序,我应该用什么?而有人可以直接我的教程创建一个的Andr​​oid库

If I am to create a closed source application that requires drawables and XML files that I want to distribute to other Android programmers, what should I use? And can someone direct me to a tutorial on creating an Android Library?

推荐答案

在究竟是什么项目会受到欢迎更多细节。我的理解是,你想不泄露源出售库(一套组件/工具,开发人员可以在他们的应用程序集成)。

More details on what exactly does your project would be welcome. My understanding is that you want to sell a library (a set of components/tools developers can integrate in their app) without disclosing the source.

正如你所说,你可以不包括Jar文件的资产/资源。

As you stated, you can't include assets/resources in Jar files.

这是Android的图书​​馆计划将迫使你让源$ C ​​$ C是看得见。正确的许可条款能帮助你把周围的源$ C ​​$ C使用的法律围栏,但......嗯,你知道是什么人做的牌照......也许有些code混淆(而不是在公众可​​见的方法)可能会有帮助。

An Android Library Project would force you to let the source code be "visible". Proper licensing terms could help you put legal fences around source code usage but... well, you know what people do with licenses... Maybe some code obfuscation (not on the public visible methods) could help.

我不知道包括以&lt如何共享库;使用库>看到的工作,但这些例子依赖于系统(地图API仅适用于官方谷歌接受设备,Sprint公司的Evo前置摄像头......),可能需要将系统内建成。也许一些超级用户权限,将有助于增加一个,但这必须在每台设备上完成的,其中使用库的应用程序将要运行...

I'm not sure about how "shared libraries" included with <uses-library> work, but the examples have seen are system dependent (maps API available only on "official" Google accepted devices, Sprint Evo front facing camera...) and might require to be built within the system. Maybe some root privilege could help adding one, but this would have to be done on EACH device where applications using your library would want to run...