问题描述
在我的Android XML图形布局,它不能显示我的切换按钮
。我得到了一些错误(见下文)。我在Palette窗口和加载失败的唯一组件检查了所有其他组件是切换按钮
。问题不在于具体项目。它坚持在每一个项目中,我创建。
In my android XML Graphical Layout, it can not display my ToggleButton
. I get some errors (see below). I have checked all other components in the Palette window and the only component that fails to load is ToggleButton
. The problem is not project specific. It persists in every project I create.
注意:我试图拖动它直接以及使用XML code生成它。但它失败无论哪种方式,误差是一样的。
Note: I have tried dragging it directly as well as using XML code to generate it. But it fails either way and the error is same.
错误:
Exception raised during rendering: -1
Exception details are logged in Window > Show View > Error Log
The graphics preview in the layout editor may not be accurate:
Different corner sizes are not supported in Path.addRoundRect. (Ignore for this session)
Path.isConvex is not supported. (Ignore for this session)
我已经提到this问题并试图对其进行编辑,但编辑被拒绝。所以,请不要重定向我那里。
I have referred this question and tried to edit it but the edit was rejected. So please do not redirect me there.
我使用的API 21.所有构建工具安装。
I am using API 21. All the build tools are installed.
推荐答案
我有同样的问题,并通过改变我的目标设备屏幕上的任何xhdpi或xxhdpi设备的解决。结果
我很抱歉,但我不能发表图片呢,你所要做的就是去下拉菜单正上方的图形布局 - >一般或谷歌 - >选择xhdpi / xxhdpi目标设备时preFER 。结果
我也新到Android所以我不能够解释为什么发生这种情况,我只能猜测这是一个兼容性问题什么的。我会尝试找出更多..结果
在此期间,我希望这会变成对您有用,以及: - )
I had the same problem and solved by changing my target device screen to any of the xhdpi OR xxhdpi devices.
I'm sorry but I'm not able to post images yet, all you have to do is go to the dropdown menu just above the graphical layout -> General OR Google -> Select the xhdpi/xxhdpi target device you prefer.
I'm also new to android so I'm not able to explain why this is happening, I can only guess it's a compatibility issue or something. I'll try finding out more..
In the meantime I hope this will turn useful for you as well :-)
这篇关于无法在Eclipse IDE中创建一个切换按钮为Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!