单独用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的包前面即可

SystemProperties cannot be resolved错误的更多相关文章

  1. 恼人的The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved...错误,无奈用Struts的bean:write替代了JSTL的C:out

    一个应用中有两个页面使用了JSTL的c:out输出,就类似这么简单三句 <c:if test="${!empty error}">       <h2>&l ...

  2. 【Java】导入项目时,出现The project cannot be built until build path errors are resolved错误解决方法

    先检查jar包,jar包的地址如果不一样需要remove后重新导入的,右键项目→Build Path. 看额外的jar包有没有×,地址正不正确,要是不正确,remove错误jar包,再点击Add Ex ...

  3. eclipse中导入一个android工程有The import android cannot be resolved错误怎么办

    解决方法: 右键工程→Bulid Path→Configure Build Path... 选择Android,如图,在Project Build Target里面勾选相应的SDK即可 右键工程,pr ...

  4. 导入工程“The import android cannot be resolved”错误

    project - Properties - android 1.Project Build Target 勾选响应的SDK 2.default.properties文件,把target = andr ...

  5. 【转】The import javax.servlet cannot be resolved

    转载地址:http://www.2cto.com/kf/201212/176868.html 今天将别人的项目导入eclipse之后,出现了“The import javax.servlet cann ...

  6. The remote name could not be resolved问题的解决方法

    网站如果绑定了代理ip,内部跳转的时候,就会报The remote name could not be resolved错误,这个错误很难排查,网上也没有多少可参考的例子 现在记录下解决方法,以备参考 ...

  7. android报错——The import android.util cannot be resolved

    Eclipse导入外部Android工程时,总会遇到The import android.util cannot be resolved 错误,解决方法如下: 首先检查project.properti ...

  8. Java编程中-servlet

    今天将别人的项目导入eclipse之后,出现了“The import javax.servlet cannot be resolved”错误 import javax.servlet.ServletE ...

  9. cordova开发问题汇总

    cordova开发问题汇总 1. 导入工程的"The import android cannot be resolved"错误解决方法 2. MainActivity] Unabl ...

随机推荐

  1. 【Android】完善Android学习(二:API 2.3.4)

    备注:之前Android入门学习的书籍使用的是杨丰盛的<Android应用开发揭秘>,这本书是基于Android 2.2API的,目前Android已经到4.4了,更新了很多的API,也增 ...

  2. 数据结构:K-D树

    K-D树实际上是一棵高维二叉搜索树,与普通二叉搜索树不同的是,树中存储的是一些K维数据 普通的二叉搜索树是一维的,当推广到K维后,就是我们的K-D树了 在K-D树中跟二叉搜索树差不多,也是将一个K维的 ...

  3. mvc BundleConfig实现对Css、Js压缩打包加载

    Bundle不是.net Framework框架中的一员,使用Bundle首先要先添加引用,如下: nuget包管理--程序包管理控制台--Install-Package Microsoft.AspN ...

  4. 【Codeforces711E】ZS and The Birthday Paradox [数论]

    ZS and The Birthday Paradox Time Limit: 20 Sec  Memory Limit: 512 MB Description Input Output Sample ...

  5. 01背包入门 dp

    题目引入: 有n个重量和价值分别为Wi,Vi的物品.从这些物品中挑选出总重量不超过W的物品,求所有挑选方案中的价值总和的最大值. 分析: 首先,我们用最普通的方法,针对每个物品是否放入背包进行搜索. ...

  6. 概率DP入门学习QAQ

    emmmm博客很多都烂尾了...但是没空写..先写一下正在学的东西好了 概率DP这东西每次考到都不会..听题解也是一脸懵逼..所以决定学习一下这个东东..毕竟NOIP考过...比什么平衡树实在多了QA ...

  7. Shell脚本中引用、调用另一个脚本文件的2种方法

    Shell脚本中引用.调用另一个脚本文件的2种方法 http://www.jb51.net/article/67903.htm

  8. FIS3 大白话【一】

    1.fis3可以用fis.set进行一些全局的配置,包括忽略文件.文件后缀处理类型.源码过滤等等,用fis3.get可以得到配置信息,详见: http://fis.baidu.com/fis3/doc ...

  9. [New learn]GCD的卡死现象分析研究

    https://github.com/xufeng79x/GCDDemo 1.简介 前接[New learn]GCD的基本使用,我们分析了GCD的一般使用方法,其中比较特殊的是在分析到主队列的时候发生 ...

  10. 内核添加USB模块

    Device Drivers->SCSI device support->SCSI disk support Device Drivers->USB support->Supp ...