2017-07-10 2 views
0

J'essaie de ne faire qu'un tiroir de navigation. Je reçois ces erreurs -Android Studio, erreur, dans le tiroir de navigation

$  Error:(7, 23) No resource found that matches the given name (at 'icon' with value '@drawable/ic_menu_camera'). 
Error:(11, 23) No resource found that matches the given name (at 'icon' with value '@drawable/ic_menu_gallery'). 
Error:(15, 19) No resource found that matches the given name (at 'icon' with value '@drawable/ic_menu_slideshow'). 
Error:(23, 31) No resource found that matches the given name (at 'icon' with value '@drawable/ic_menu_share'). 
Error:(27, 31) No resource found that matches the given name (at 'icon' with value '@drawable/ic_menu_send'). 

Essayer de suivre ce tutoriel - https://www.youtube.com/watch?v=ju837bQOBfg

Voici mon fichier Global.xml qui a l'erreur

$<menu xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto"> 


<group android:checkableBehavior="single"> 
    <item android:id="@+id/nav_first_layout" 
     android:icon="@drawable/ic_menu_camera" 
     android:title="First Layout"/> 

    <item android:id="@+id/nav_second_layout" 
     android:icon="@drawable/ic_menu_gallery" 
     android:title="Second Layout"/> 

<item android:id="@+id/nav_third_layout" 
    android:icon="@drawable/ic_menu_slideshow" 
    android:title="Third Layout"/> 
    </group> 

    <item> android:title="Communicate"> 
     <menu> 
      <item 
       android:id="@+id/nav_share" 
       android:icon="@drawable/ic_menu_share" 
       android:title="Share" /> 
      <item 
       android:id="@+id/nav_send" 
       android:icon="@drawable/ic_menu_send" 
       android:title="Send" /> 
     </menu> 


     </item> 
    </menu> 
     <!--</menu>--> 
    <!-- </item>--> 

    <!--<item android:id="@+id/action_settings"--> 
     <!--android:title="@string/action_settings"--> 
     <!--android:orderInCategory="100"--> 
     <!--app:showAsAction="never" />--> 

Here is the source code from the video

Je peux aussi télécharger mon code source. Je suis un débutant dans un studio Android et mon seul but en ce moment est d'apprendre à faire le tiroir de navigation. Toute aide alternative, lien vers un tutoriel plus facile ou des pointeurs vers où je vais mal serait très apprécié!

+0

Vérifiez si ces ressources existent dans le dossier pouvant être tracé –

Répondre

0

Apparemment, vous n'avez pas importé les tiroirs eux-mêmes. A partir du lien que vous avez posté sur le code source de la vidéo, naviguez vers/NavigationDrawer/app/src/main/res/drawable-v21 /, voici où sont tous les drawables, copiez tout ici et collez-le sous votre drawable dossier.