这是我的理解, apklib
包含code +资源与共享Maven的
。
AAR
文件分发摇篮
。
在 AAR
不同于apklib一个主要方式:类编译并包含在AAR的根classes.jar。而 apklib
不能包含编译的类文件或jar文件。
1有人可以解释VS之间的 apklib
的主要区别 AAR
文件?
2能的Maven
使用 AAR
?可摇篮
使用 apklib
?
3的格式是更好?
解决方案1有人可以解释VS AAR apklib之间的主要区别 文件?
这在我脑海中,除了你说的一对夫妇的差异
AAR
可以包含在情况下,没有源$ C $ c和里面的库一个java的jar
文件夹,你不'吨要提供源$ C $ C(如谷歌播放服务所做的);
AAR
可以包含自定义ProGuard的文件和自定义皮棉规则,虽然我不知道他们是考虑到目前。
2可以使用Maven的AAR?可以用摇篮apklib?
Android的Maven插件支持 AAR
自3.7.0版本。
摇篮不支持使用 apklib
相关性,但你可以导出 Android的库
为 apklib
(见这个帖子)。
From my understanding, apklib
contains code + resource shared with Maven
.
aar
files are distributed by Gradle
.
The aar
differ from apklib in one major way : classes are compiled and included in a classes.jar in the root of the aar. Whereas apklib
cannot contain compiled class files or jars.
1 Can somebody explain the main differences between apklib
vs aar
files ?
2 Can Maven
use aar
? Can Gradle
use apklib
?
3 Which format is "better" ?
解决方案1 Can somebody explain the main differences between apklib vs aar files ?
Couple differences that comes to my mind, in addition to the one you said:
aar
can contain no source code and a java jar inside the libs
folder in case you don't want to provide the source code (like Google Play Services does);
aar
can contain custom proguard file and custom lint rules, although I'm not sure they are take into account at the moment.
2 Can Maven use aar ? Can Gradle use apklib ?
The Android Maven Plugin supports aar
since version 3.7.0.
Gradle doesn't support using apklib
dependencies but you could export your android-library
as apklib
(see this post).
上一篇:共享图像不会在Viber的和Facebook合作会在、图像、Facebook、iber
下一篇:从Eclipse中切换到IntelliJ IDEA的为Android开发的好处切换到、好处、Eclipse、IntelliJ