我想在我的项目中使用这个库:https://github.com/hdodenhof/CircleImageView我正在使用 eclipse。我下载了 jar 文件并放入了 libs 文件夹。
我的 xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="131.50dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:background="@android:color/black" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="75dp"
android:src="@drawable/profile_viewer" />
<de.hdodenhof.circleimageview.CircleImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/profile_image"
android:layout_width="96dp"
android:layout_height="96dp"
android:src="@drawable/profile_viewer"
app:border_width="2dp"
app:border_color="#FF000000"/>
</RelativeLayout>
我收到以下错误:
Multiple annotations found at this line:
- error: No resource identifier found for attribute 'border_color' in package
'com.impact.ribony'
- error: No resource identifier found for attribute 'border_width' in package
'com.impact.ribony'
我该如何解决这个问题?
最佳答案
如果您的样式或 dimen xml 中有 border_color
或 border_width
名称,请检查您的样式,然后重命名它们,如果它不起作用则
添加
xmlns:app="http://schemas.android.com/apk/res-auto"
到你的根布局
如果你使用源代码而不是这个lib项目的jar就好了
关于android - eclipse 中外部库的使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28796890/