导入Android和QUOT;网格布局库项目"直接进入我的项目 [英] Import Android "Gridlayout library project" directly into my project

查看:142
本文介绍了导入Android和QUOT;网格布局库项目"直接进入我的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经找到了如何使用GridLayout的为Android 4.0设备。我下载了支持库,导入它作为一个库项目,然后我引用它作为我自己的项目库。
但我想直接拥有图书馆在我自己的项目。我已经在我自己的libs文件夹复制libs文件夹中的文件。我也复制了attrs.xml和dimens.xml到我自己的项目。然后我说这两个jar文件到我的构建路径。
Eclipse本身带给我没有错误,但Android的布局编辑器无法呈现我的布局了,因为一些找不到,等问题(我不是从我的办公室写这个,让我遗憾的是不能发布的确切错误信息,但我会做明天)。

我真的需要在一个项目中的一切。
难道我忘了什么东西?它甚至有可能?因为我还没有发现任何网格式布局支持库样本如果有人在一个项目合并的一切。

我希望你明白我的问题,先谢谢了。

修改
这是我的布局编辑说:


  

com.android.layoutlib.bridge.MockView不能转换为android.view.ViewGroup
  异常详细信息记录在窗口>显示视图>错误日志
  以下类不能被实例化:
   - android.support.v7.widget.GridLayout(公开课,显示错误日志)
  请参阅错误日志(窗口>显示视图)的更多细节。


在这里,我对错误日志消息:


  

general.xml:com.android.layoutlib.bridge.MockView不能转换为android.view.ViewGroup


  
  

android.support.v7.widget.GridLayout失败的实例。



解决方案

试试这个:

右键点击你的项目 - >属性 - > Java构建path->为了和出口
其中,刻度标记的所有选项。

我希望这将解决您的问题。

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.

解决方案

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.

这篇关于导入Android和QUOT;网格布局库项目"直接进入我的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆