SupportMapFragment does not support AndroidX Fragment

This issue has already been reported to Google in the public issue tracker:

https://issuetracker.google.com/issues/110573930

I would suggest starring the feature request in the public issue tracker to add your vote and subscribe to further notifications from Google. Hopefully, Google will implement it in next versions of Android Maps SDK.

Update

Google has provided the following answer in the public issue tracker

Hi all,

As noted the Google Maps API is currently based off the support libraries and not AndroidX. Future versions of Google Maps API will certainly support AndroidX, but in the meantime, the following workaround will resolve the issue for you:

  • Use Android Studio 3.2 (currently preview) or higher

  • Ensure your build.gradle contains ‘compileSdkVersion 28’ (default for new AS 3.2 projects)

  • Include the following in your gradle.properties file (default for new AS 3.2 projects)

    android.useAndroidX=true

    android.enableJetifier=true

Finally, for existing code referencing the support libraries, you can use the “Refactor -> Refactor to AndroidX” tool in Android Studio 3.2+ to automatically convert your code to use the new AndroidX packages.

Leave a Comment