Error:Failed to resolve: com.google.android.gms:pl

2019-09-20 05:50发布

I am using Twilio for SMS verification for my Android app, but when I add the repository of Twilio verification dependency(compile 'com.twilio: verification:+') the Gradle can not be built and shows the following error: Error:Failed to resolve: com.google.android.gms:play-services-auth-api-phone:10.2.5 can anyone help me!

enter image description here

and I installed and update the repositories.enter image description here

note: for the first time it let me update the repository but now it doesn't let me update the repository.

2条回答
狗以群分
2楼-- · 2019-09-20 06:00

Make sure you add that repository in your repository list. In your app’s build.gradle

allprojects {
    repositories {
        jcenter()  // This is missing 

    }
}
查看更多
The star\"
3楼-- · 2019-09-20 06:23

Same Problem with me, but i solved this problem by adding:

implementation 'com.google.android.gms:play-services-auth:15.0.1'

Hope it helps:)

查看更多
登录 后发表回答