Android Studio app和module共同调用jar方法

Android Studio app和module如何共同调用'com.android.support:appcompat-v7:28.0.0'?

V4 V7包使用时经常导致冲突,我最终的解决办法是全部换成androidx,使用起来感觉好多了。

先在你的module导入要调用com.android.support:appcompat-v7,
当app导入这个module时使用:

compile ('你的module名字')
{
exclude group: 'com.android.appcompat-v7'//(去掉module里面的jar)
}

另app也要导入要 com.android.support:appcompat-v7

1.app中的build.gradle文件引入 module-> 在 dependencies{... implementation project('modulename')}
2.在module 的build.gradle文件引入jar文件或者库,在dependencies{... api files('libs/yourfile.jar')}