NetBeans IDE 7.2.1无法访问java.lang致命错误:无法在类路径或bootclasspath中查找包java.lang [英] NetBeans IDE 7.2.1 cannot access java.lang Fatal Error: Unable to find package java.lang in classpath or bootclasspath

查看:736
本文介绍了NetBeans IDE 7.2.1无法访问java.lang致命错误:无法在类路径或bootclasspath中查找包java.lang的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要帮助NetBeans中的android项目。我刚刚打开在NetBeans中创建的项目,我有一些问题,无法访问java.lang
致命错误:无法在类路径或bootclasspath中找到包java.lang
这是一个我的样本文件有问题:

  package Helpers; 
import PreglednikLogika.Clanak;
import android.content.Context;

第一行包帮助者带下划线并生成无法访问java.lang
致命错误:无法在类路径或bootclasspath中查找包java.lang



我是netbeans的新人,我尝试了一些修复,但没有成功。有人能帮我吗我认为这是添加参考库或类似的问题...但不确定。

解决方案

我刚刚发现了什么问题是


  1. 我将此路径更新为正确的路径 sdk.dir = E:\\\项目文件 local.properties 中的\\ANDROID\\\Eclipse371\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ b $ b

  2. 我更新了 project.properties 文件#Project target.target = android-8 ,目标8我有7之前显然不支持这个版本的SDK。


我成功构建我的项目:)


I need help with android project inside NetBeans. I Just opened project which is created in NetBeans and I have some issues with "cannot access java.lang Fatal Error: Unable to find package java.lang in classpath or bootclasspath" This is sample of one my file which have issues:

package Helpers;
import PreglednikLogika.Clanak;
import android.content.Context;

The first line package Helpers; is underlined and produce "cannot access java.lang Fatal Error: Unable to find package java.lang in classpath or bootclasspath"

I am new with netbeans and I tried some fixes but not success. Can somebody help me ? I think this is adding reference library or something like that issue... but not sure.

解决方案

I just found what the problem was.

  1. I updated this path to my correct path sdk.dir=E:\\ANDROID\\Eclipse371\\android-sdk in project file local.properties.

  2. I updated project.properties file # Project target.target=android-8, to target 8 I had 7 before that obviously does not supported in this version of SDK.

and I successfully build my project :)

这篇关于NetBeans IDE 7.2.1无法访问java.lang致命错误:无法在类路径或bootclasspath中查找包java.lang的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆