SystemProperties cannot be resolved错误
2015-11-10 10:31
579 查看
单独用eclipse打开一个工程,出现SystemProperties.get()会出现SystemProperties cannot be resolved.错误
1. 引用SystemProperties.get()会出现SystemProperties cannot be resolved.
解决方法:
在当前工程属性(Properties) -> Java Build Path -> Libraries
点击Add External JARs...按钮, 选择layoutlib.jar文件,然后在项目源文件中增加import android.os.SystemProperties;
layoutlib.jar文件位于: android sdk/platforms/android-*.*/data目录下.
layoutlib.jar项目是从外部导入Eclipse中的,只要一编译,就会报错:Conversion to Dalvik format failed: Unable to execute dex: null , 同时Eclipse也变的很卡,好几次都挂掉了.
解决
1:设置内存
eclipse.exe的快捷方式——右键/属性 在 目标 里填写如下内容
"D:/eclipse/eclipse.exe" -vmargs -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M
双引号内 为eclipse的安装路径。
如果1不行:
应该采用用户库的形式导入该库,具体步骤如下:
1. Right-click the project in Eclipse and select "Build Path -> Add Libraries...".
2. Select User Library from the list and click Next.
3. Click the "User Libraries..." button.
4. Click "New..." in the User Libraries dialog.
5. Give the user library a name and select the System library checkbox and click OK.
6. Highlight the newly added user library in the list and click the "Add JARs..." button and add the desired jar files.
7. Click OK on the User Libraries dialog.
8. Make sure the new user library is checked in the Add Library dialog and
用到我自己的项目上去。编译OK。
如果还是有红色叉叉,则选择java build path --》order
and export把自己导入的包放到android的包前面即可
1. 引用SystemProperties.get()会出现SystemProperties cannot be resolved.
解决方法:
在当前工程属性(Properties) -> Java Build Path -> Libraries
点击Add External JARs...按钮, 选择layoutlib.jar文件,然后在项目源文件中增加import android.os.SystemProperties;
layoutlib.jar文件位于: android sdk/platforms/android-*.*/data目录下.
layoutlib.jar项目是从外部导入Eclipse中的,只要一编译,就会报错:Conversion to Dalvik format failed: Unable to execute dex: null , 同时Eclipse也变的很卡,好几次都挂掉了.
解决
1:设置内存
eclipse.exe的快捷方式——右键/属性 在 目标 里填写如下内容
"D:/eclipse/eclipse.exe" -vmargs -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M
双引号内 为eclipse的安装路径。
如果1不行:
应该采用用户库的形式导入该库,具体步骤如下:
1. Right-click the project in Eclipse and select "Build Path -> Add Libraries...".
2. Select User Library from the list and click Next.
3. Click the "User Libraries..." button.
4. Click "New..." in the User Libraries dialog.
5. Give the user library a name and select the System library checkbox and click OK.
6. Highlight the newly added user library in the list and click the "Add JARs..." button and add the desired jar files.
7. Click OK on the User Libraries dialog.
8. Make sure the new user library is checked in the Add Library dialog and
用到我自己的项目上去。编译OK。
如果还是有红色叉叉,则选择java build path --》order
and export把自己导入的包放到android的包前面即可
相关文章推荐
- tomcat的webapp下的root文件夹的作用是什么
- Java数据库连接-JNDI方式- 配置Tomcat6.0 连接池 配置相关
- margin-top无效的解决方法
- 中兴MF667S WCDMA猫Linux拨号笔记
- 11月7日全球域名商保有量及市场份额排行榜TOP16
- 每天一个linux命令(40):wc命令
- linux下c/c++实例之九识别中文字符
- TOP域名11月初市场报告:单日注册量13.6万创新高
- linux查看和修改系统时间
- 去除HDFS WARN util.NativeCodeLoader
- linux下MySQL与jdk安装
- Linux下实现MySQL数据备份和恢复的命令使用全攻略
- 如何从Apache官网下载windows版apache服务器
- Kali Linux 常见错误整理
- Centos6.5服务器以Server模式配置H2内存数据库方案
- CentOS+JDK+Tomcat+MySql&JDBCDriver 开发环境搭建实录
- Linux多线程实践(3) --线程属性
- 彻底隐藏Nginx版本号的安全性与方法
- linux下c/c++实例之八字符串分隔、去空格和转大小写
- (总结)隐藏Apache版本号的必要性与方法