首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Android Studio,错误,在导航抽屉中

Android Studio,错误,在导航抽屉中
EN

Stack Overflow用户
提问于 2017-07-11 04:09:16
回答 1查看 654关注 0票数 0

我只想做一个导航抽屉。我得到了这些错误-

代码语言:javascript
复制
$        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'). 

尝试遵循本教程- https://www.youtube.com/watch?v=ju837bQOBfg

下面是我的global.xml文件,其中包含错误

代码语言:javascript
复制
$<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

我也可以上传我的源代码。我是android studio的初学者,我现在唯一的目标是学习如何制作导航抽屉。任何替代的帮助,链接到更容易的教程或指向我出错的地方的指针将非常感谢!

EN

回答 1

Stack Overflow用户

发布于 2017-07-11 04:23:12

看起来你并没有导入画布本身。从你发布的关于视频源代码的链接中,导航到/NavigationDrawer/app/src/main/res/drawable-v21/,这里是所有可绘制文件的位置,只需将所有内容复制到此处并粘贴到可绘制文件夹下即可。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45020736

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档