Android Studio中的6种依赖 - JackPeng博客
source link: http://yuanfentiank789.github.io/2016/07/11/dependency/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Android Studio中的6种依赖
Compile
compile是对所有的build type以及favlors都会参与编译并且打包到最终的apk文件中。
Provided
Provided是对所有的build type以及favlors只在编译时使用,类似eclipse中的external-libs,只参与编译,不打包到最终apk。
只会打包到apk文件中,而不参与编译,所以不能再代码中直接调用jar中的类或方法,否则在编译时会报错
Test compile
Test compile 仅仅是针对单元测试代码的编译编译以及最终打包测试apk时有效,而对正常的debug或者release apk包不起作用。
Debug compile
Debug compile 仅仅针对debug模式的编译和最终的debug apk打包。
Release compile
Release compile 仅仅针对Release 模式的编译和最终的Release apk打包。
http://www.cnblogs.com/kangyi/p/4449857.html
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK