I am trying to implement v2 for android MapView. I got this work perfectly except for this error.
This is what it looks like when I download the application from scratch ... 
As you can see, there are no problems.
Now, when I click on the Home button and try to access the application from the Recent Applications window, I get the following: 
and it stays that way until I release the application and restart it from scratch.
Here is my code.
layout.xml
<LinearLayout android:id="@+id/maps_container" android:layout_width="match_parent" android:layout_height="match_parent"> <fragment android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" android:name="com.google.android.gms.maps.SupportMapFragment" android:layout_marginBottom="100dip" android:layout_marginLeft="10dip" android:layout_marginRight="10dip" android:layout_marginTop="100dip"/> </LinearLayout>
Activity:
public class MyActivity extends BaseActivity { private GoogleMap mMaps; private LinearLayout mMapsContainer; @Override public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.my_layout); mMapsContainer = (LinearLayout) findViewById(R.id.maps_container); mMaps =((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap(); } @Override public void onPause() { super.onPause(); } @Override public void onResume() { super.onResume(); if (mMaps == null) { mMaps = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap(); } getSupportFragmentManager().findFragmentById(R.id.map).onResume(); }
}
BaseActivity:
public abstract class BaseActivity extends FragmentActivity implements LocationListener, GooglePlayServicesClient.ConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener {
}
source share