如何使用android.os.SystemProperties
2012-07-19 14:49
267 查看
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/
但是这样做会出现一个问题,编译的时候会报错: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/
相关文章推荐
- 如何使用android.os.SystemProperties的方法
- 如何使用android.os.SystemProperties的方法
- 如何使用android.os.SystemProperties的方法
- 如何使用android.os.SystemProperties
- 如何使用android.os.SystemProperties的方法
- 如何使用android.os.SystemProperties
- 如何使用android.os.SystemProperties的方法
- 如何使用android.os.SystemProperties
- 如何使用android.os.SystemProperties的方法
- 关于android.os.SystemProperties的使用
- android.os.SystemProperties反射帮助类
- Android:如何在fragment里使用getSystemService()
- 如何反射获取Android SystemProperties 的字段
- android.os.SystemProperties和android.os.Environment
- Android 中 SystemProperties 使用方法
- android SystemProperties--如何配置系统属性
- can t find dynamically referenced class android os systemproperties
- 无法找到android.os.SystemProperties解决办法
- Error:(10, 18) 错误: 找不到符号 符号: 类 SystemProperties 位置: 程序包 android.os