简体   繁体   中英

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

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.

右键单击项目,属性-> Android->选择构建目标->应用->确定

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM