Android Maps API v2 添加圆圈无法解决

标签 android google-maps google-maps-android-api-2

我需要在 map 上添加圆圈,但在将 Google Play 服务更新为 here 后仍然“无法解决” 如何让它发挥作用?

代码:

     CircleOptions co = new CircleOptions();
        co.center(latlng);
        co.radius(getCircleSize());
        co.fillColor(getCircleColor());
        co.strokeColor(getStrokeColor());
        co.strokeWidth(2.0f);
    Circle circle = mMap.addCircle(co);

错误是:

CircleOptions cannot be resolved to a type

最佳答案

已解决。如果您将project-lib Google Play Services从SDK目录复制到工作区目录中,则在通过Android SDK Manager更新后,不要忘记再次复制新版本库项目。我的秋天:)

关于Android Maps API v2 添加圆圈无法解决,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17090816/

相关文章:

android - AsyncTask - 如何在使用已更新的值之前等待 onPostExecute() 完成

android - Wifi Direct Invitation 后 WifiP2pDevice 状态保持为 INVITED

javascript - 在 Google Maps API v3 上调用 setContent() 时,InfoWindow 闪烁

Android map 方向

android - 如果用户不手动更新相机,请跟踪我的位置 - Google map v2

android - 非 Activity 类中的 Access 数据库

javascript - 如何使用 Google Places API 获取邮政编码?

javascript - 谷歌地图折线 : Mark the two Polyline coordinates that contain the clicked LatLng

android - GoogleMap.OnMarkerDragListener 无法正常工作

android - 获取 "Error: Missing Constraints in ConstraintLayout"