Android 在使用导航 sdk 和地图 sdk 时出现重复类错误

问题描述 投票:0回答:0

我想同时使用 Google 地图和导航 SDK,但出现重复类错误。如果排除 'com.google.android.gms' 则找不到 SupportMapFragment 和其他地图类。

使用以下实现

implementation "com.google.android.gms:play-services-maps:17.0.0"
implementation "com.google.android.gms:play-services-location:17.0.0"
implementation 'com.google.android.maps:navsdk:3.2.0' 
implementation 'com.google.android.libraries.mapsplatform.transportation:transportation-driver:4.0.0'

添加以下依赖项

在模块 jetified-navsdk-4.3.2-runtime (com.google.android.maps:navsdk:4.3.2) 和 jetified-play-services-maps- 中发现重复类 com.google.android.gms.maps.CameraUpdate 17.0.0-运行时 (com.google.android.gms:play-services-maps:17.0.0) 在模块 jetified-navsdk-4.3.2-runtime (com.google.android.maps:navsdk:4.3.2) 和 jetified-play-services-maps-17.0 中发现重复类 com.google.android.gms.maps.CameraUpdateFactory .0-运行时(com.google.android.gms:play-services-maps:17.0.0) 在模块 jetified-navsdk-4.3.2-runtime (com.google.android.maps:navsdk:4.3.2) 和 jetified-play-services-maps-17.0 中发现了重复的类 com.google.android.gms.maps.GoogleMap .0-运行时(com.google.android.gms:play-services-maps:17.0.0) 在模块 jetified-navsdk-4.3.2-runtime (com.google.android.maps:navsdk:4.3.2) 和 jetified-play-services-maps 中发现了重复的类 com.google.android.gms.maps.GoogleMap$CancelableCallback -17.0.0-运行时(com.google.android.gms:play-services-maps:17.0.0) 在模块 jetified-navsdk-4.3.2-runtime (com.google.android.maps:navsdk:4.3.2) 和 jetified-play-services-maps 中发现了重复的类 com.google.android.gms.maps.GoogleMap$InfoWindowAdapter -17.0.0-运行时(com.google.android.gms:play-services-maps:17.0.0) 在模块中找到重复的类 com.google.android.gms.maps.GoogleMap$OnCameraChangeListener

android google-maps android-gradle-plugin supportmapfragment
© www.soinside.com 2019 - 2024. All rights reserved.