Skip to content

Commit 36f0c22

Browse files
Merge pull request #211696 from ambientlight/patch-1
AzureMaps: quick-start-android: add step to make sure android.useAndroidX=true and android.enableJetifier=true
2 parents c64ca11 + 45bc0f5 commit 36f0c22

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

articles/azure-maps/quick-android-map.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ titleSuffix: Microsoft Azure Maps
44
description: 'Quickstart: Learn how to create an Android app using the Azure Maps Android SDK.'
55
author: stevemunk
66
ms.author: v-munksteve
7-
ms.date: 02/09/2022
7+
ms.date: 09/22/2022
88
ms.topic: quickstart
99
ms.service: azure-maps
1010
services: azure-maps
@@ -120,7 +120,17 @@ The next step in building your application is to install the Azure Maps Android
120120
121121
:::image type="content" source="./media/quick-android-map/project-settings-file.png" alt-text="A screenshot of the project settings file in Android Studio.":::
122122
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:
124134

125135
1. Verify your project's **minSdk** is **21** or higher.
126136

@@ -143,7 +153,7 @@ The next step in building your application is to install the Azure Maps Android
143153
144154
:::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.":::
145155
146-
4. Add a map fragment to the main activity:
156+
5. Add a map fragment to the main activity:
147157
148158
```xml
149159
<com.azure.android.maps.control.MapControl
@@ -159,7 +169,7 @@ The next step in building your application is to install the Azure Maps Android
159169
160170
::: zone pivot="programming-language-java-android"
161171
162-
5. In the **MainActivity.java** file you'll need to:
172+
6. In the **MainActivity.java** file you'll need to:
163173
164174
* Add imports for the Azure Maps SDK.
165175
* Set your Azure Maps authentication information.
@@ -267,7 +277,7 @@ The next step in building your application is to install the Azure Maps Android
267277
268278
::: zone pivot="programming-language-kotlin"
269279
270-
5. In the **MainActivity.kt** file you'll need to:
280+
7. In the **MainActivity.kt** file you'll need to:
271281
272282
* add imports for the Azure Maps SDK
273283
* set your Azure Maps authentication information
@@ -373,7 +383,7 @@ The next step in building your application is to install the Azure Maps Android
373383
374384
::: zone-end
375385
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.
377387
378388
:::image type="content" source="media/quick-android-map/run-app.png" alt-text="A screenshot showing the run button in Android Studio.":::
379389

0 commit comments

Comments
 (0)