You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-maps/quick-android-map.md
+16-6Lines changed: 16 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ titleSuffix: Microsoft Azure Maps
4
4
description: 'Quickstart: Learn how to create an Android app using the Azure Maps Android SDK.'
5
5
author: stevemunk
6
6
ms.author: v-munksteve
7
-
ms.date: 02/09/2022
7
+
ms.date: 09/22/2022
8
8
ms.topic: quickstart
9
9
ms.service: azure-maps
10
10
services: azure-maps
@@ -120,7 +120,17 @@ The next step in building your application is to install the Azure Maps Android
120
120
121
121
:::image type="content" source="./media/quick-android-map/project-settings-file.png" alt-text="A screenshot of the project settings file in Android Studio.":::
122
122
123
-
3. Open the application **build.gradle** file and do the following:
123
+
3. Open the project's **gradle.properties** file, verify that `android.useAndroidX` and `android.enableJetifier` are both set to `true`.
124
+
125
+
If the **gradle.properties** file does not include `android.useAndroidX` and `android.enableJetifier`, add the next two lines to the end of the file:
126
+
127
+
```gradle
128
+
android.useAndroidX=true
129
+
android.enableJetifier=true
130
+
```
131
+
132
+
133
+
4. Open the application **build.gradle** file and do the following:
124
134
125
135
1. Verify your project's **minSdk** is **21** or higher.
126
136
@@ -143,7 +153,7 @@ The next step in building your application is to install the Azure Maps Android
143
153
144
154
:::image type="content" source="./media/quick-android-map/build-gradle-file.png" alt-text="A screenshot showing the application build dot gradle file in Android Studio.":::
145
155
146
-
4. Add a map fragment to the main activity:
156
+
5. Add a map fragment to the main activity:
147
157
148
158
```xml
149
159
<com.azure.android.maps.control.MapControl
@@ -159,7 +169,7 @@ The next step in building your application is to install the Azure Maps Android
159
169
160
170
::: zone pivot="programming-language-java-android"
161
171
162
-
5. In the **MainActivity.java** file you'll need to:
172
+
6. In the **MainActivity.java** file you'll need to:
163
173
164
174
* Add imports for the Azure Maps SDK.
165
175
* Set your Azure Maps authentication information.
@@ -267,7 +277,7 @@ The next step in building your application is to install the Azure Maps Android
267
277
268
278
::: zone pivot="programming-language-kotlin"
269
279
270
-
5. In the **MainActivity.kt** file you'll need to:
280
+
7. In the **MainActivity.kt** file you'll need to:
271
281
272
282
* add imports for the Azure Maps SDK
273
283
* set your Azure Maps authentication information
@@ -373,7 +383,7 @@ The next step in building your application is to install the Azure Maps Android
373
383
374
384
::: zone-end
375
385
376
-
6. Select the run button from the toolbar, as shown in the following image (or press `Control` + `R` on a Mac), to build your application.
386
+
8. Select the run button from the toolbar, as shown in the following image (or press `Control` + `R` on a Mac), to build your application.
377
387
378
388
:::image type="content" source="media/quick-android-map/run-app.png" alt-text="A screenshot showing the run button in Android Studio.":::
0 commit comments