2016-08-02 19 views
0

Ich bin derzeit auf einem Android-Kern App arbeitet mit Xamarin, ich habe 23.4.0.1 android Unterstützung Design installiert und Android.Support.v7.AppCompat 23.4.0.1Xamarin android Keine Resource Identifier für das Attribut in Paket gefunden

Und das Problem, das ich jetzt habe in diesen Zeilen ist:

app:headerLayout="@layout/nav_header" 
    app:menu="@layout/menu_navigation" 

Mit dem Fehler „Kein Resource Identifier für das Attribut in Paket gefunden“

ich einige der Fragen, Lesen bereits hier beantwortet , kann aber immer noch nicht den Fehler beheben, vielleicht weil ich benutze Xamarin, ich weiß es nicht.

Voll Code in Frage:

<?xml version="1.0" encoding="utf-8"?> 
<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" 
android:id="@+id/drawer" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:fitsSystemWindows="true" 
tools:openDrawer="start"> 
<android.support.design.widget.CoordinatorLayout 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:fitsSystemWindows="true" 
    tools:context="com.learn2crack.myapplication.MainActivity"> 
    <android.support.design.widget.AppBarLayout 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content"> 
     <android.support.v7.widget.Toolbar 
      android:id="@+id/toolbar" 
      android:layout_width="match_parent" 
      android:layout_height="?attr/actionBarSize" 
      android:background="?attr/colorPrimary" /> 
    </android.support.design.widget.AppBarLayout> 
    <include 
     layout="@layout/listitem_device" /> 
</android.support.design.widget.CoordinatorLayout> 
<android.support.design.widget.NavigationView 
    android:id="@+id/navigation_view" 
    android:layout_height="match_parent" 
    android:layout_width="wrap_content" 
    android:layout_gravity="start" 
    app:headerLayout="@layout/nav_header" 
    app:menu="@layout/menu_navigation"/> 
</android.support.v4.widget.DrawerLayout> 

Hinweis: Ich habe dieses Tutorial wurde mit: https://www.learn2crack.com/2016/03/android-material-design-sliding-navigation-drawer.html

Antwort

0

Das Problem war, dass ich mit:

<android.support.v4.widget.DrawerLayout> 

Statt:

</android.support.v7.widget.DrawerLayout> 

Jetzt funktioniert mein Code.

-1

Haben Sie fügen Sie den app: Namespace ontop Ihrer Kontrolle?

xmlns:app="http://schemas.android.com/apk/res-auto"

+0

Ja, ich habe es auf – elunap

+0

können Sie die vollständige Build-Ausgabe in Ihrer Frage posten? –

+0

Ja, ich habe es gerade getan. – elunap

1

Änderung

xmlns:app|xmlns:local="http://schemas.android.com/apk/res-auto" 

von

xmlns:app|xmlns:local="http://schemas.android.com/apk/lib/com.app.chasebank" 

und bauen