Imported Eclipse projects that do not compile

advertisements

I installed Eclipse 4.2 in new windows 8, and copied and imported all my projects. All projects are based on phonegap so have the phonegap build

None will compile and all have red X by the src> app.java although they work fine in the original eclipse.

I dont understand the errors so dont know where to start:

My Code: The error for the line in () not part of code

package com.x.x;
import android.os.Bundle;         (ERROR=The import android.os.Bundle cannot be resolved)
import com.phonegap.*;
public class App extends DroidGap {         (ERROR= The hierarchy of the type App is inconsistent)
/** Called when the activity is first created. */
@Override                       (ERROR = Override cannot be resolved to a type)
public void onCreate(Bundle savedInstanceState) {      (ERROR=Bundle cannot be resolved to a type)
    super.onCreate(savedInstanceState);
    super.loadUrl("file:///android_asset/www/index.html");   (ERROR = The method loadUrl(String) from the type DroidGap refers to the missing type String)
}
}

Error line 1:

     Multiple markers at this line
- The type android.os.Bundle cannot be resolved. It is indirectly referenced from
 required .class files
- The type android.content.Intent cannot be resolved. It is indirectly referenced from
 required .class files
- The type java.lang.String cannot be resolved. It is indirectly referenced from
 required .class files
- The type java.lang.Object cannot be resolved. It is indirectly referenced from
 required .class files


Step one is to resolve your JRE setup, which is obviously not in order (java.lang.Object cannot be resolved). Open project properties, Java Build Path, Libraries, and in the list find the item referring to the JRE. Edit this entry. You will probably need to locate the JRE on your filesystem.