구글 맵을 사용하려면 Google Maps API key 가 필요함
AndroidManifest.xml 에 있는 https://developers.google.com/maps/documentation/android-sdk/get-api-key 로 이동
[Android 앱 패키지명 확인]
Android Project - AndroidManifest.xml - package
[SHA-1 인증서 디지털 지문 확인]
cmd 창 열고 입력
keytool -list -v -alias androiddebugkey -keystore %USERPROFILE%.android\debug.keystore
비밀번호 : android 입력
<manifest>
<application
...>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR_API_KEY" />
...
</application>
</manifest>
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' version '2.0.0' apply false
plugins {
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
}
...
dependencies {
// Google Maps
implementation 'com.google.android.gms:play-services-maps:18.0.2'
implementation 'com.google.android.gms:play-services-location:20.0.0'
}
출처 : https://developers.google.com/android/guides/client-auth
https://skysoulbear.tistory.com/93