我試圖找到並導入makeramen的圖書館,因爲我不能copile我的項目,收到這些錯誤:如何導入庫在ADT項目爲Eclipse
錯誤消息:
Multiple annotations found at this line:
- error: No resource identifier found for attribute 'border_color' in package 'myapp'
- error: No resource identifier found for attribute 'mutate_background' in package 'myapp'
- error: No resource identifier found for attribute 'border_width' in package 'myapp'
- error: No resource identifier found for attribute 'oval' in package 'myapp'
我的XML:
<com.makeramen.RoundedImageView xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/mapImage"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@drawable/list_map_bar"
android:padding="12dp"
android:scaleType="fitCenter"
android:src="@drawable/list_world"
app:border_color="@color/xroads_grey"
app:border_width="2dp"
app:mutate_background="true"
app:oval="true" />
我不知道如何解決這個問題,運行& copile的Android項目。 任何人都可以幫助我嗎?
非常感謝!
更新2
我收到被導入到ADT的Android項目 - Eclipse的。有缺少一些庫,並請檢查下面的完整結構的項目形象:
的Android項目(對不起,我可以上傳圖像,因爲計算器不要讓我上載的任何圖像):
LoginActivity
-Android 4.3
-Referenced Libraries
-rundedimageview-1.5.0-sources.jar
-src
-gen [Generated Java Files]
-assets
-bin
-libs
-res
-AndroidManifest.xml
-ic_launcher-we.png
-lint.xml
-project.properties
下的文件夾/ res/layout在我之前提到的關於缺少庫和依賴關係的文件上有一些錯誤消息。所以我已經將RoundedImageView JAR添加到項目中,但沒有任何更改。
有什麼想法? 讓我知道是否有人需要關於任何文件的更多信息o錯誤消息。 它缺少build.gradle文件,這是正常的或我可以創建?
更新3:
我改變了代碼爲納迪姆·伊克巴勒推薦,但錯誤依然存在。我可以在代碼中運行帶有這些錯誤的應用程序。請幫忙!
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res/io.cran.crossroads"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<FrameLayout
android:layout_width="100dp"
android:layout_height="100dp"
android:id="@+id/map"
android:layout_alignBottom="@+id/avatar"
android:layout_toRightOf="@id/imageBarLeft">
<com.makeramen.RoundedImageView
android:id="@+id/mapImage"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@drawable/list_map_bar"
android:padding="12dp"
android:scaleType="fitCenter"
android:src="@drawable/list_world"
app:border_color="@color/xroads_grey"
app:border_width="2dp"
app:mutate_background="true"
app:oval="true" />
</FrameLayout>
您是使用Eclipse IDE還是Android Studio? – behelit 2014-12-03 04:18:55
我正在使用ADT - Eclipse。 – maceguo 2014-12-04 02:33:37