先建立一个lib工程,然后build出aar. 接着把aar放入要引入它的工程module的libs中. 在project的build.gradle中: repositories { flatDir { dirs 'libs' //this way we can find the .aar file in libs folder } } 在app中的build.gradle中: dependencies { compile(name:'你的aar的名字', ext:'aar') } 参考自: h
转自:http://www.cnblogs.com/xitang/p/3615768.html#commentform 使用引用项目,无法追到源代码,无法Debug库项目The JAR of this class file belongs to container 'Android Dependencies' which does not allow modificasource not found 1.库项目建立 新建Android项目,下一步 ,有一个复选 as a Libray 勾上 库