我在新的 Windows 8 中安装了 Eclipse 4.2,并复制并导入了我所有的项目。所有项目都基于 phonegap,所以有 phonegap 构建
src> app.java 没有一个会编译并且所有的都有红色 X,尽管它们在原始 Eclipse 中工作正常。
我不明白错误所以不知道从哪里开始:
我的代码: () 中的行的错误不是代码的一部分
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)
}
}
错误行 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