Failed to resolve: com.google.android.gms:play-services in IntelliJ Idea with gradle

前端 未结 13 1974
一向
一向 2020-12-02 11:09

I\'m trying to add google play services to my libGDX project in IntelliJ Idea. I\'ve followed the setup guide here: https://developers.google.com/android/guides/setup

<
13条回答
  •  时光取名叫无心
    2020-12-02 11:35

    I tried solving this problem for hours after I haven't used Android Studio some time and wasn't aware of the updates.

    It is important that google() is the first item that stands in repositories like this:

    allprojects {
        repositories {
            google()
            jcenter()
            mavenCentral()
        }
    }
    

    Somehow google() was the second item after jcenter(), so everything was messed up and didn't work. Maybe this helps someone.

提交回复
热议问题