如何使用android.os.SystemProperties

 android.os.SystemProperties在SDK的库中是没有的,需要把Android SDK 目录下data下的layoutlib.jar文件加到当前工程的附加库路径中,然后在源程序中就可以Import了。

    但是这样做会出现一个问题,编译的时候会报错:Unable to execute dex: Java heap space 。在网上找了一下,这个链接比较有帮助:http://programfeelings.blogspot.com/2011/03/unable-to-execute-dex-java-heap-space.html

    上面这个链接需要翻墙才能访问,我把内容复制在下面:

    

    最近要用到第三方的庫android-sdk-windows\platforms\android-8\data\layoutlib.jar,但出現Conversion to Dalvik format failed: Unable to execute dex: null這個問題。且出現對話方塊


下面是解法:
Another way to solve the ” Conversion to Dalvik format failed: Unable to execute dex: null” problem is using the user library, the concrete steps are as follows: 
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 … 


http://wyoojune.blog.163.com/blog/static/57093325201231414510575/

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值