본문 바로가기

개발일기

23.09.13 부트캠프 64일차 TIL googleMap

 

구글맵 지도 api키 깃허브 push 시 가려지는 방법

 

error code
buildscript {} blocks must appear before any plugins {} blocks in the script
해결방법 : plugins 위에 작성하기

buildscript {
    dependencies {
        classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1"
    }
}

plugins {
    id 'com.android.application' version '8.0.2' apply false
    id 'com.android.library' version '8.0.2' apply false
    id 'org.jetbrains.kotlin.android' version '1.8.20' apply false
}

 

1.
local.properties 파일에 
GOOGLE_MAP_KEY=구글맵API키 입력

2.
AndroidManifest.xml 파일에 가서
 <meta-data android:name="com.google.android.maps.v2.API_KEY"
            android:value="${GOOGLE_MAP_KEY}"/> 이렇게 입력

 

 

 

error Unresolved reference: Manifest

해결방법 import android.Manifest

 

 

 

개인과제 복습중

 

 

해결방법 : imageView width height 사이즈를 warp_content로 둘다 해놔서 100dp 100dp로 나눠서 줌