1
试图实现谷歌地图API在我的Android项目,并得到警告错误是在我的Java代码无法创建谷歌地图片段
GoogleMap gMap;
gMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
LatLng Jamaica = new LatLng(18.1155173, -77.2760026);
gMap.moveCamera(CameraUpdateFactory.newLatLngZoom(Jamaica, 13));
gMap.addMarker(new MarkerOptions()
.title("Jamaica")
.snippet("The greatest country in the world")
.position(Jamaica));
gMap.setMyLocationEnabled(true);
的logcat:
03-18 12:45:00.140: W/ActivityThread(10477): ClassLoader.loadClass: The class loader returned by Thread.getContextClassLoader() may fail for processes that host multiple applications. You should explicitly specify a context class loader. For example: Thread.setContextClassLoader(getClass().getClassLoader());
是的,我做了...... – Quion
03-19 08:58:50.250:I /编舞师(2443):跳过了42帧!应用程序可能在其主线程上做了太多工作。 – Quion
越来越好了.... – Quion