androidStudio无法引用library中的jar包 implementation

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/mo_feng_/article/details/81019514

今天遇到一个问题
我导入一个module到AndroidStudio,将它改成lib

<application
        android:supportsRtl="true">

gradle改成

apply plugin: 'com.android.library'

最后发现主app中无法引用它的jar包。
罪魁祸首是下面这句话

implementation fileTree(include: ['*.jar'], dir: 'libs')

implementation引入的包只给当前项目用
所以换成

compile fileTree(include: ['*.jar'], dir: 'libs')

成功

猜你喜欢

转载自blog.csdn.net/mo_feng_/article/details/81019514