1、生成aar
2、在项目中引用
3、gradle 中写入:
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs') androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) // 支付宝 SDK AAR 包所需的配置 implementation files('libs/alipaySdk-15.6.2-20190416165036.aar') // 图片浏览 implementation files('libs/mango-release.aar') // 图片选择 implementation files('libs/imagepicker-release.aar')