尝试在android studio中运行应用程序时未找到资源标识符错误

尝试在android studio中运行应用程序时未找到资源标识符错误,android,android-studio,Android,Android Studio,我是安卓的新手,也是安卓工作室的新手。我已经做了以下工作: 我在根项目中创建了一个名为libs的文件夹。在我的libs文件夹中有一个cardslibrary。我正在我的应用程序中使用此库。我的xml文件如下所示: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" and

我是安卓的新手,也是安卓工作室的新手。我已经做了以下工作:

我在根项目中创建了一个名为libs的文件夹。在我的libs文件夹中有一个cardslibrary。我正在我的应用程序中使用此库。我的xml文件如下所示:

 <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout    
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical" android:layout_width="match_parent"
     android:layout_height="match_parent"
     xmlns:card="http://schemas.android.com/apk/res-auto" >

   <it.gmariotti.cardslib.library.view.CardView
     android:id="@+id/carddemo"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     card:card_layout_resourceID="@layout/card_thumbnail_layout" />

我认为我使用名称空间的方式是不正确的。但在浏览了某些帖子之后,我也无法找出问题所在。请一步一步地指导我。

一旦我在android studio中遇到同样的问题。。当我在第xmlns:card行的res auto位置添加包名时=http://schemas.android.com/apk/res-auto解决了这个问题

那是一张卡片=http://schemas.android.com/apk/your_package_name


你可以试试看

必须在项目中添加模块cardlib.core,确保查看项目属性是否链接库的模块。对我来说,它奏效了。
问候。

尝试通过gradle集成卡片库,编译'com.android.support:cardview-v7:21.0.+'在应用程序模块的build.gradle依赖项中错误仍然存在请看这张伟大的图坦卡德,cardview由谷歌自己提供,您不需要gmariotti提供的库您是否已将该库添加到项目中?我已添加了库您的意思是包含该库的应用程序包名?
Error:(9) No resource identifier found for attribute 'card_layout_resourceID' in package 'com.example.root.card_demo'
Error:(13, 38) No resource found that matches the given name (at 'card_layout_resourceID' with value '@layout/card_thumbnail_layout').