Je veux implémenter une mise en page qui a un MapView et NavigationView, ci-dessous est ce que j'ai essayé suivant this tutoriel. Je reçois cette erreur android.view.InflateException: Binary XML file line #43: Error inflating class fragmen
Quel est le problème?android.view.InflateException, Erreur gonflement classe de fragment
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".ShopsCatalogActivityUsingMapView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/drawer"
android:fitsSystemWindows="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--toolbar-->
<include
android:id="@+id/tool_bar"
layout="@layout/tool_bar">
</include>
<!--map-->
<FrameLayout
android:id="@+id/frame"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--map-->
<fragment xmlns:map="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".CustomInfo" />
</FrameLayout>
</LinearLayout>
<!--navigation drawer-->
<android.support.design.widget.NavigationView
android:id="@+id/my_navigation_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:headerLayout="@layout/navigation_view_header"
app:menu="@menu/navigation_drawer_menu" />
</android.support.v4.widget.DrawerLayout>
ligne n ° 43 est celui qui a le fragment contenant la carte
Est-ce votre fichier XML complet? ceux-ci doivent être enveloppés dans une disposition de tiroir –
Affichez le fichier de mise en page entier, quelle ligne est # 43? – RobVoisey