单独用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. CharSequence 去除两端空格

    CharSequence就是字符序列,String, StringBuilder和StringBuffer都是其实现类. 模仿String.trim() 实现了一个CharSequence通用的去除两 ...

  2. HDU 1087 Super Jumping! Jumping! Jumping! --- DP入门之最大上升子序列

    题目链接 DP基础题 求的是上升子序列的最大和 而不是最长上升子序列LIS DP[i]表示以a[i]结尾所能得到的最大值 但是a[n-1]不一定是整个序列能得到的最大值 #include <bi ...

  3. OPENId是什么, OAUTH 是什么

    what is openId open id is said to be a protocol which uses url as username, so if a website supports ...

  4. 用vue快速开发app的脚手架工具

    前言 多页面应用于结构较于简单的页面,因为简答的页面使用router又过于麻烦.本脚手架出于这样的场景被开发出来. 使用脚手架搭配Hbuilder也同样可以快速使用vue开发安卓和IOS APP. 本 ...

  5. html+js+node实现五子棋线上对战,五子棋最简易算法

    首先附上我的github地址,https://github.com/jiangzhenfei/five,线上实例:http://47.93.103.19:5900/client/ 线上实例,你可以随意 ...

  6. idea 调试远程tomcat

    # ----- Execute The Requested Command ----------------------------------------- JAVA_OPTS="-age ...

  7. Ubuntu中启用关闭Network-manager网络设置问题! 【Server版本】

    在UbuntuServer版本中,因为只存有命令行模式,所以要想进行网络参数设置,只能通过修改/etc/network/interfaces.具体设置方法如下: (1) UbuntuServer 修改 ...

  8. splay:优雅的区间暴力!

    万年不更的blog主更新啦!主要是最近实在忙,好不容易才从划水做题的时间中抽出一段时间来写这篇blog 首先声明:这篇blog写的肯定会很基础...因为身为一个蒟蒻深知在茫茫大海中找到一个自己完全能够 ...

  9. LeetCode 19 Valid Parentheses

    Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the inpu ...

  10. sicily 1020. Big Integer

    Description Long long ago, there was a super computer that could deal with VeryLongIntegers(no VeryL ...