在Android studio中去编译开源的仓库,大概率就是各种编译不过,一堆错误,一顿改错,基本上会耗费非常多时间,比如:
这个就是改gradle版本,改成7.2 ,修改完成之后,还有其他报错:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find pub.devrel:easypermissions:0.3.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/pub/devrel/easypermissions/0.3.0/easypermissions-0.3.0.pom
- https://jcenter.bintray.com/pub/devrel/easypermissions/0.3.0/easypermissions-0.3.0.pom
- https://jitpack.io/pub/devrel/easypermissions/0.3.0/easypermissions-0.3.0.pom
- https://dl.bintray.com/thelasterstar/maven/pub/devrel/easypermissions/0.3.0/easypermissions-0.3.0.pom
Required by:
project :app
> Could not find com.danikula:videocache:2.7.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/danikula/videocache/2.7.0/videocache-2.7.0.pom
- https://jcenter.bintray.com/com/danikula/videocache/2.7.0/videocache-2.7.0.pom
- https://jitpack.io/com/danikula/videocache/2.7.0/videocache-2.7.0.pom
- https://dl.bintray.com/thelasterstar/maven/com/danikula/videocache/2.7.0/videocache-2.7.0.pom
Required by:
project :app
主要原因还是因为国外仓库无法下载,可以使用国内仓库:
allprojects {
repositories {
google()