android XML视图在Eclipse中不显示ToggleButton [英] android XML view Does not display ToggleButton in Eclipse
本文介绍了android XML视图在Eclipse中不显示ToggleButton的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的Android XML图形布局中,我无法显示我的 ToggleButton
。我收到一些错误(见下文)。此外,我无法使用图形布局编辑任何其他内容。
In my android XML Graphical Layout, I am unable to display my ToggleButton
. I receive some errors (see below). Also, I am not able to edit anything else using the Graphical Layout.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.thunder4apps.lanterna.corinthians.MainActivity" >
<ToggleButton
android:id="@+id/togglebutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textOn="Vibrate on"
android:textOff="Vibrate off"
android:onClick="onToggleClicked"/>
</RelativeLayout>
错误:
Exception raised during rendering: -1
Exception details are logged in Window > Show View > Error LogThe 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)
推荐答案
转到您的图形布局并找到API级别的下拉菜单,可能您正在使用最后一个21,并且您没有安装它,根据您的应用更改为其他杠杆。
Go to your graphical layout and locate the drop down of the API levels, probably you are using the last one 21, and you don´t have it installed, change to other lever according to your app.
这篇关于android XML视图在Eclipse中不显示ToggleButton的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文