12

The app has a Google Map built-in by using Maps SDK. Tapping one of the icons on the Map Toolbar should launch the external Maps app.

enter image description here

The launching of the external Maps app had been working well until targetSDKVersion=29. When targetSDKVersion=30, the launching failed, and the screen showed this message: Google Maps is not installed or is disabled.

Why is that?

autumnmaple
  • 201
  • 2
  • 9
  • 2
    I was able to reproduce this, seems like an Maps SDK for Android issue. Would mind filing a bug for this on [Google's Public Issue Tracker](http://issuetracker.google.com/issues?q=componentid:188870)? – jabamataro Oct 29 '20 at 06:13
  • 1
    Hi i have the same problem at the moment. Did you find any solution to fix this yet ? – Frank Nov 03 '20 at 22:36

1 Answers1

26

EDIT: This issue should be fixed in version 17.0.1 of the library. You can refer to the release notes.

I work in Developer Relations for Google Maps. This issue is due to package visibility requirements introduced in Android 11. You can read more about it here. Essentially, your app needs to declare in the AndroidManifest.xml all the packages it requires to function correctly.

To fix this, you will need to add the Google Maps package "com.google.android.apps.maps" as an entry in your AndroidManifest.xml <queries> entry:

<manifest package="com.your.package">
  <queries>
    <package android:name="com.google.android.apps.maps" />
  </queries>
  ...
</manifest>

You can also refer to our sample.

Chris Arriola
  • 1,636
  • 3
  • 17
  • 23
  • Hi Chris. I just happened to stumble upon this issue. What's the deal with the new beta sdk not being updated in over a year? – Jack Jun 18 '21 at 16:43
  • Thanks Chris. Additionally, it is necessary to upgrade Gradle to 3.5.4 to avoid the error "Missing 'package' key attribute on element package at AndroidManifest.xml...". Like this: https://stackoverflow.com/a/67820136/9686461 – fvaldivia Nov 24 '21 at 10:59
  • 1
    i was stuck in this for very long time. Thank you so much @Chris Arriola – abdulec90 Feb 10 '22 at 15:31
  • thanks i was stuck with this problem too – Eyner Mamani May 03 '22 at 19:11