1. ํด๋ผ์ด์ธํธ ID ๋ฐ๊ธํ๊ธฐ
ํ๋ก์ ํธ๋ช ์ ์๋๋ก์ด๋ ํจํค์ง๋ช ๊ณผ ๋์ผํ๊ฒ
2. AndroidManifest.xml ์ฝ๋ ์ถ๊ฐ
<application
tools:replace="android:appComponentFactory"
android:appComponentFactory="whateverString">
<meta-data
android:name="com.naver.maps.map.CLIENT_ID"
android:value="๋ฐ๊ธ๋ฐ์ ID" />
</application>
3. build.gradle(:app)
dependencies {
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.6.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
// ๋ค์ด๋ฒ ์ง๋ SDK
implementation 'com.naver.maps:map-sdk:3.15.0'
}
4. gradle.properties
android.useAndroidX=true
android.enableJetifier=true
5. settings.gradle
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
maven {
url 'https://naver.jfrog.io/artifactory/maven/'
}
}
}
6. activity_main.xml
<fragment
android:id="@+id/map"
android:name="com.naver.maps.map.MapFragment"
android:layout_width="match_parent"
android:layout_height="600dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@+id/tv"/>
'tip๐ก' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
๊นํ๋ธ ์ด๋ฏธ ์๊ฒฉ ์ ์ฅ์์ ์ฌ๋ฆฐ ๋ธ๋์น๋ช ์์ (0) | 2025.01.15 |
---|---|
KPT ํ๊ณ (0) | 2024.11.08 |