簡體   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