繁体   English   中英

Android-库xmlns的ClassNotFoundException

[英]Android - ClassNotFoundException for library xmlns

我有一个库项目位于:Project / extralibs /文件夹中。

现在我在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" />

现在,我收到“找不到属性的资源标识符。”错误。 我试图将xmlns的路径更改为/ lib / lib-auto和库路径,但是在运行它后却得到ClassNotFoundException。

无需构建外部jar。 尝试将其从构建路径中删除,然后按照以下步骤操作:

  1. 在Android项目的根目录中创建一个名为libs的文件夹。
  2. 将jar添加到该文件夹​​。
  3. 右键单击jar,然后单击添加以生成路径。
  4. 清理您的项目,然后重试。

暂无
暂无

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

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