感谢CSDN
小宝不多情
https://blog.csdn.net/u012678179/article/details/52173444
补充(适用资源重合)
加入jitpack之后,其他项目进行引用的话出现下载不了库或者下载库后启动报错,加入下列方式可以避免。
修改上传到github的主工程中AndroidManifest.xml文件
在manifest节点上加入xmlns:tools="http://schemas.android.com/tools"
然后在application节点上加入tools:replace="android:icon,android:theme,android:allowBackup"
如下
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
......
tools:replace="android:icon,android:theme,android:allowBackup">
</application>
</manifest>