Joe88
Joe88

Reputation: 3

Eclipse shows error (unable to resolve target)

I got a project and imported it in Eclipse (it is an android project). The project works on other computers, but unfortunately not on mine. The error which comes up is in the console of eclipse when i import the project: "Unable to resolve target 'android-8'"

Furthermore do i get multiple errors in on of the .java-files in the src folder of the project.

3 of them are showing "String cannot be resolved to type":

Here the code (It is for a music player the timer /showing of the seconds):

    /**
 * Function to convert milliseconds time to
 * Timer Format
 * Hours:Minutes:Seconds
 * */
public String milliSecondsToTimer(long milliseconds){
    String finalTimerString = "";
    String secondsString = "";

I hope you can help me!

Thank you so much in advance!

If you have any questions please let me know.

Thanks guys.

Cheers

Upvotes: 0

Views: 1342

Answers (3)

warbi
warbi

Reputation: 2725

It seems you have something set with a build target of API 8. Perhaps a subproject or library?

If that's intended then it sounds like you need to download Android 2.2 (API 8) through your Android SDK manager.

Upvotes: 0

Ajeesh
Ajeesh

Reputation: 1646

You'll be having project.properties file open that and change the android-8 to whatever android version you have. After changing this goto Window->Preferences->Android. You'll be having target name & api level. select any one of them & specify it in project.properties file.

Upvotes: 1

Abhishek V
Abhishek V

Reputation: 12536

Right click on the project, Properties -> Android -> Select the build target -> Apply -> OK

Upvotes: 0

Related Questions