在android工程中导入layoutlib.jar…

来源:互联网 发布:入职程序员感觉干不了 编辑:程序博客网 时间:2024/04/30 15:31
/**
 * xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 *
 * @hide
*/
打了@hide标签的,在android.jar中是找不到的。
在android-sdk-linux_x86/platforms/android-10/data/layoutlib.jar中包含了source中internal的api,在eclipse中导入这个jar包就可以使用internal的api了。
导入方法:
1.Right-click the project in Eclipse and select "Build Path -> AddLibraries...".
2.Select User Library from the list and clickNext.
3. Clickthe "User Libraries..." button.
4. Click"New..." in the User Libraries dialog.
5. Givethe user library a name and select the System library checkbox andclick OK.
6.Highlight the newly added user library in the list and click the"Add JARs..." button and add the desired jarfiles.
7. ClickOK on the User Libraries dialog.
8. Makesure the new user library is checked in the Add Library dialogand...

不以这种方式添加会出现DEXerror,切记
0 0
原创粉丝点击