Google Play Services - Could not find dependency

Asked 2 years ago, Updated 2 years ago, 82 views

We are developing it on Android.
com.google.android.gms:play-services-location:15.0.1
When I try to put location in the gradle above, I get an error.
The older version of 11.0.2 goes in without any problems, but the other libraries that depend on it are said to be out of date and will result in build errors, so you need to include the latest version.
I'm looking for a solution, but I've tried all of the following.

  • Include google() in build.gradle
  • Input Google Play Service
  • Include Support Repository

The content of the error is as follows:

When building, the following contents

Failed to resolve: com.google.android.gms:play-services-location:15.0.1
Install Repository and sync project
Show in File
Show in Project Structure dialog

When I do the top installation, it stops in the middle and I get the following error:

Could not find dependency "com.google.android.gms:play-services-location:15.0.1"

I will paste the contents of build.gradle, so I would appreciate it if you could tell me what the problem is.Enter a description of the image here

android android-studio gradle

2022-09-30 20:20

1 Answers

I solved myself!
Google() was written only on the buildscript side.
I added Google() to Android and now I can get it.


2022-09-30 20:20

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.