반응형

안드로이드 스튜디오 프로젝트를 파이어 베이스(Realtime Database)와 연동하기위해 플러그인와 의존성을 추가하고 있었는데 

Plugin [id: 'com.google.gms.google-services'] was not found in any of the following sources: 에러가 발생하였습니다.

 

 

공식문서를 보고 모듈 (앱 수준) Gradle 파일인 build.gradle(Module: 프로젝트명.app)에 플러그인을 추가하는 과정에서 위와 같은 에러가 발생하였습니다.

plugins {
    // Add the following line:
    id 'com.google.gms.google-services'
}

사실 공식 문서 상에는 모듈 (앱 수준) Gradle 파일에 위와 같은 플러그인을 추가하기 전에

루트 수준(프로젝트 수준) Gradle 파일인 build.gradle(Project: 프로젝트명)에 아래와 같은 의존성을 추가하라고 되어있습니다.

buildscript {
  dependencies {
    // Add the following line:
    classpath 'com.google.gms:google-services:4.3.10'  // Google Services plugin
  }
}

이 과정을 거치지 않고 모듈 (앱 수준) Gradle 파일에 위와 같은 플러그인을 추가하였더니 에러가 발생하였습니다. 

위의 의존성을 추가해주고  그 후 플러그인을 추가해주었더니 에러가 해결 되었습니다.

 

Plugin [id: 'com.google.gms.google-services'] was not found in any of the following sources: 에러 해결방법 정리

루트 수준(프로젝트 수준) Gradle 파일인 build.gradle(Project: 프로젝트명)에 아래와 같은 의존성을 추가

buildscript {
  dependencies {
    // Add the following line:
    classpath 'com.google.gms:google-services:4.3.10'  // Google Services plugin
  }
}

그 후 모듈 (앱 수준) Gradle 파일에 아래와 같은 플러그인을 추가

plugins {
    // Add the following line:
    id 'com.google.gms.google-services'
}
반응형
  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기