我在新的Windows 8中安装了Eclipse 4.2,并复制并导入了我的所有项目.所有项目都基于phonegap,所以有了phonegap构建
没有人会编译,并且所有人都有src>的红色X app.java尽管它们在原始日食中工作正常.
我不明白错误,所以不知道从哪里开始:
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
解决方法:
第一步是解决你的JRE设置,这显然不是有序的(java.lang.Object无法解析).打开项目属性,Java Build Path,Libraries,并在列表中找到引用JRE的项目.编辑此条目.您可能需要在文件系统上找到JRE.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。