在使用AndroidUSBCamera 项目时出现此问题,查找多处资料基本都无效,此文章记录下亲测有效的方案。
问题描述:
在https://github.com/jiangdongguo/AndroidUSBCamera 下载下来之后导入Android Studio后出现
Failed to resolve: com.serenegiant:common:4.1.1
解决方法:
1、从https://download.csdn.net/download/xw245184020/12414825 将aar包下载下来
2、在项目的根目录建立aars文件夹,并将下载下来的common-4.1.1.aar放入aars中
3、在项目的build.gradle中添加如下代码
//添加aar依赖
flatDir {
dirs '../aars'
}
添加后的效果如下图
4、在需要引用的module的build.gradle添加,
implementation(name:'common-4.1.1', ext:'aar')
并将之前的
api "com.serenegiant:common:${commonLibVersion}"注释掉即可
5、重新build即可正常运行