关于Android Studio的Unable to resolve dependency for ‘:app@debug/compileClasspath’: Could not find any

  • Post author:
  • Post category:其他


Unable to resolve dependency for ':app@debug/compileClasspath': Could not find any matches for com.facebook.android:facebook-login:[4,5) as no versions of com.facebook.android:facebook-login are available.
Open File
Show Details


Failed to resolve: com.squareup.okhttp3:okhttp:3.10.0
Show in File
Show in Project Structure dialog

这个问题处理起来很简单,直接修改build.gradle中allprojects的就行了,然后重新Sync一下轻松解决,修改结果如下:

allprojects {
   repositories {
      flatDir {
        dirs 'libs'
      }
	   google()
	   mavenCentral()
	   jcenter()
   }
}



版权声明:本文为RinKas原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。