错误膨胀类片段当我使用Google地图恢复活动时,为什么会出现此错误

时间:2017-03-08 13:04:05

标签: android google-maps

我正在使用谷歌地图的Android应用程序。 我一直面临这个错误

  

错误扩充类片段

每当我使用Google地图片段和我的应用程序崩溃恢复活动时 下面是我的Logcat

03-08 15:50:43.930 6316-6316/com.extrainch.sendas E/AndroidRuntime:FATAL EXCEPTION: main
Process: com.extrainch.sendas, PID: 6316
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.extrainch.sendas/com.extrainch.sendas.HomeActivity}: android.view.InflateException: Binary XML file line #29: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2521)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2595)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4210)
at android.app.ActivityThread.access$900(ActivityThread.java:178)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1476)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5631)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
Caused by: android.view.InflateException: Binary XML file line #29: Error inflating class fragment
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:763)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at com.extrainch.sendas.fragments.PickupFragment$override.onCreateView(PickupFragment.java:98)
at com.extrainch.sendas.fragments.PickupFragment$override.access$dispatch(PickupFragment.java)
at com.extrainch.sendas.fragments.PickupFragment.onCreateView(PickupFragment.java:0)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:2184)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1298)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1523)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1585)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:2832)
at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:201)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:603)
at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:181)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1244)
at android.app.Activity.performStart(Activity.java:6108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2478)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2595) 
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4210) 
at android.app.ActivityThread.access$900(ActivityThread.java:178) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1476) 
at android.os.Handler.dispatchMessage(Handler.java:111) 
at android.os.Looper.loop(Looper.java:194) 
at android.app.ActivityThread.main(ActivityThread.java:5631) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754) 
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f07000e type #0x3 is not valid
at android.content.res.Resources.getDimensionPixelSize(Resources.java:786)
at com.google.maps.api.android.lib6.impl.fq.<init>(:com.google.android.gms.DynamiteModulesB:2099)
at com.google.maps.api.android.lib6.impl.fq.<init>(:com.google.android.gms.DynamiteModulesB:64)
at com.google.maps.api.android.lib6.impl.az.a(:com.google.android.gms.DynamiteModulesB:367)
at com.google.maps.api.android.lib6.impl.az.a(:com.google.android.gms.DynamiteModulesB:320)
at com.google.maps.api.android.lib6.impl.cp.a(:com.google.android.gms.DynamiteModulesB:82)
at com.google.maps.api.android.lib6.impl.co.a(:com.google.android.gms.DynamiteModulesB:139)
at com.google.android.gms.maps.internal.w.onTransact(:com.google.android.gms.DynamiteModulesB:107)
at android.os.Binder.transact(Binder.java:385)
at com.google.android.gms.maps.internal.IMapFragmentDelegate$zza$zza.onCreateView(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment$zza.onCreateView(Unknown Source)
at com.google.android.gms.dynamic.zza$4.zzb(Unknown Source)
at

我在xml中的片段看起来像这样

<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />

我的问题是为什么在恢复活动时我会继续收到此错误以及我做错了什么? 请帮忙。

0 个答案:

没有答案