Reputation: 35928
I'm trying to import this library: https://github.com/vinc3m1/RoundedImageView
As mentioned on the README I added following in my build.gradle
compile 'com.makeramen:roundedimageview:1.3.0'
and added the following in my xml
<com.makeramen.RoundedImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/imageView1"
android:src="@drawable/photo1"
android:scaleType="centerCrop"
app:corner_radius="30dip"
app:border_width="2dip"
app:border_color="#333333"
app:round_background="true"
app:is_oval="true" />
After this if I Rebuild Project
I keep getting an error
No resource identifier found for attribute 'round_background' in package 'com.myapp'
Should I be doing something else to import a library in my gradle project?
Upvotes: 0
Views: 604
Reputation: 363429
Check the attrs
on library:
The round_background
attribute doesn't exist.
If you check the history, this attribute has been changed in mutate_background
https://github.com/vinc3m1/RoundedImageView/commit/6d734ca0b99b7541039a03da615e7420b7b8238d
Change your xml:
<com.makeramen.RoundedImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/imageView1"
android:src="@drawable/photo1"
android:scaleType="centerCrop"
app:corner_radius="30dip"
app:border_width="2dip"
app:border_color="#333333"
app:mutate_background="true"
app:is_oval="true" />
Upvotes: 0
Reputation: 701
You must have forgot to sync your project with gradle file.
Code:
repositories {
mavenCentral()
}
Upvotes: 1