Trying to implement google map API in my android project and getting the warning error that is under my java code
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());
Your problem solved. I also had this problem. (I only changed my map key)
Did you add
<uses-library android:name="com.google.android.maps" />
to your manifest under the application tag?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.