我在Android 5.1.1(OPPO手机)上遇到此问题
Fatal Exception: java.lang.IllegalStateException: Bad magic number for Bundle: 0x6f0063
at android.os.BaseBundle.readFromParcelInner(BaseBundle.java:1346)
at android.os.BaseBundle.readFromParcelInner(BaseBundle.java:1334)
at android.os.Bundle.readFromParcel(Bundle.java:1046)
at com.google.android.gms.maps.internal.IMapFragmentDelegate$zza$zza.onResume(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment$zza.onResume(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment.onSaveInstanceState(Unknown Source:6000)
at android.support.v4.app.Fragment.performSaveInstanceState(Fragment.java:2353)
at android.support.v4.app.FragmentManagerImpl.saveFragmentBasicState(FragmentManager.java:2599)
at android.support.v4.app.FragmentManagerImpl.saveAllState(FragmentManager.java:2670)
at android.support.v4.app.FragmentController.saveAllState(FragmentController.java:134)
at android.support.v4.app.FragmentActivity.onSaveInstanceState(FragmentActivity.java:571)
at android.support.v7.app.AppCompatActivity.onSaveInstanceState(AppCompatActivity.java:509)
很难重新制作,但它几乎出现在OPPO手机Android 5.1.1上。 也许它与这个问题有关 https://issuetracker.google.com/issues/37011984
任何解决问题的工作方法?提前谢谢。
这是活动xml的一部分
<fragment
android:id="@+id/map"
class="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
onCreate活动
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
mapFragment.getMapAsync(this);