1

I am trying to use code from a project that I downloaded from Github, however I am consistently getting errors.

Is there more steps needed to use a project than importing it into eclipse?

I am currently just copying and pasting code from the downloaded project to mine.

Attempting to use the following:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res/com.mikhaellopez.circularimageviewsample" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center" android:orientation="vertical" > <com.mikhaellopez.circularimageview.CircularImageView android:layout_width="250dp" android:layout_height="250dp" android:src="@drawable/image" app:border="true" app:border_color="@color/GrayLight" app:border_width="4dp" app:shadow="true" /> </LinearLayout> 

But getting the error:

Multiple annotations found at this line: - error: No resource identifier found for attribute 'border_color' in package 'com.mikhaellopez.circularimageviewsample' - error: No resource identifier found for attribute 'shadow' in package 'com.mikhaellopez.circularimageviewsample' - error: No resource identifier found for attribute 'border' in package 'com.mikhaellopez.circularimageviewsample' - error: No resource identifier found for attribute 'border_width' in package 'com.mikhaellopez.circularimageviewsample' 

1 Answer 1

3

Is there more steps needed to use a project than importing it into eclipse?

Well, that depends.

I am currently just copying and pasting code from the downloaded project to mine.

Depending upon how that code is written, that may not work well.

But getting the error:

Change:

xmlns:app="http://schemas.android.com/apk/res/com.mikhaellopez.circularimageviewsample" 

to:

xmlns:app="http://schemas.android.com/apk/res-auto" 

as your app does not have the package name of com.mikhaellopez.circularimageviewsample, apparently.

Sign up to request clarification or add additional context in comments.

6 Comments

Thank you for your help. I am basically wondering if i need to add certain files to the build path etc?
@codeme2020: What you are trying to reuse is an Android library project. To reuse one in Eclipse, import it into your workspace, then use Project > Properties > Android in the app project to attach the library to it. developer.android.com/tools/projects/… For most library projects, that's probably sufficient.
Worked perfectly thanks, What is the difference between a library project and a regular project? Do you want to write the steps outlined in an answer so that I can accept it?
@codeme2020: "What is the difference between a library project and a regular project?" -- a checkbox in Eclipse. :-) developer.android.com/tools/projects/… "Do you want to write the steps outlined in an answer so that I can accept it?" -- my answer answers the question that you asked. Everything else has just been commentary follow-up. You had a compile error; I pointed out how to resolve the compile error.
Is there any reason why the addition of an external library to a project would cause problems within the project? I followed the steps outlined for my project, it caused problems within the project. Would this be because I am already using external APIs. e.g. neurosky?
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.