gradle导入第三方依赖包,报错Failed to resolve: com.github...
看了很多文章,说放在allprojects{}里,还是不行,然后到处搜,在github看到解决方案,终于解决了。
- 在 settings.gradle 添加
dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() jcenter() // Warning: this repository is going to shut down soon maven { url 'https://jitpack.io' } } }