简体   繁体   English

Android-库xmlns的ClassNotFoundException

[英]Android - ClassNotFoundException for library xmlns

I have a library project that located in :Project/extralibs/ folder. 我有一个库项目位于:Project / extralibs /文件夹中。

now I have this view in xml : 现在我在xml中有此视图:

  <com.winsontan520.WScratchView
        xmlns:wsv="http://schemas.android.com/apk/res-auto"
        android:id="@+id/scratch_view"
        android:layout_width="300dp"
        android:layout_height="300dp"
        android:layout_centerInParent="true"
        wsv:antiAlias="true"
        wsv:overlayColor="#0000ff"
        wsv:revealSize="20dp"
        wsv:scratchable="true" />

And now I`m getting "No resource identifier found for attribute.." error. 现在,我收到“找不到属性的资源标识符。”错误。 I tried to change the path of xmlns to /lib/lib-auto and to the library path but getting ClassNotFoundException after running it. 我试图将xmlns的路径更改为/ lib / lib-auto和库路径,但是在运行它后却得到ClassNotFoundException。

There's no need to build the external jar. 无需构建外部jar。 Try removing it from your build path and follow these steps: 尝试将其从构建路径中删除,然后按照以下步骤操作:

  1. Create a folder in the root of your Android project called libs. 在Android项目的根目录中创建一个名为libs的文件夹。
  2. Add the jar to that folder. 将jar添加到该文件夹​​。
  3. Right-click the jar and click to add to build path. 右键单击jar,然后单击添加以生成路径。
  4. Clean your project and try it again. 清理您的项目,然后重试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM