【发布时间】:2018-11-06 01:39:07
【问题描述】:
我正在尝试在我的应用程序中使用 Google Maps Extension。但是当我尝试对我的谷歌地图对象使用 setClustering 方法时,它显示未解决错误,这意味着谷歌地图类没有这个方法。
mMap.setClustering(new ClusteringSettings().enabled(false).addMarkersDynamically(true));
但是,根据库文档,我必须像这样使用。此外,可用的 Stackoverflow 答案也确实像这种answer 方式。
这是我的依赖
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:27.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:cardview-v7:27.+'
compile 'com.android.support:design:27.+'
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.code.gson:gson:2.7'
compile 'com.google.android.gms:play-services-location:12.0.1'
compile 'com.google.android.gms:play-services-maps:12.0.1'
compile 'com.google.android.gms:play-services-places:12.0.1'
compile 'com.androidmapsextensions:android-maps-extensions:2.4.0'
testCompile 'junit:junit:4.12'
}
如何解决这个问题?
【问题讨论】:
标签: android google-maps google-maps-api-2