Import Android “Gridlayout library project” directly into my project

梦想与她 提交于 2019-12-13 04:47:40

问题


i already found out how to use the Gridlayout for Android 4.0 Devices. I downloaded the support library, imported it as a library project and then i referenced it as a library in my own project. But i want to have the library directly in my own project. I already copied the files of the libs folder in my own libs folder. And i also copied the attrs.xml and dimens.xml into my own project. Then i added both jar files to my build-path. Eclipse itself gives me no error, but the Android layout editor can't render my layouts anymore, because of some "can't find, etc" problems (i writing this not from my office, so i sadly can't post the exact error message, but i will do tomorrow).

I really need everything in one project. Did i forget something? Is it even possible? Because i haven't found any "Grid Layout Support Library sample" where someone merged everything in one project.

I hope you understand my problem, thanks in advance.

EDIT This is what my layout editor says:

com.android.layoutlib.bridge.MockView cannot be cast to android.view.ViewGroup Exception details are logged in Window > Show View > Error Log The following classes could not be instantiated: - android.support.v7.widget.GridLayout (Open Class, Show Error Log) See the Error Log (Window > Show View) for more details.

And here my to error log messages:

general.xml: com.android.layoutlib.bridge.MockView cannot be cast to android.view.ViewGroup

android.support.v7.widget.GridLayout failed to instantiate.


回答1:


Try this:

right click your project->properties->java build path->order and export where tick mark all option.

I hope this will solve your problem.



来源:https://stackoverflow.com/questions/12376151/import-android-gridlayout-library-project-directly-into-my-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!