Android 导致eclipse问题的可绘制形状
我在一个可绘制的资源中定义了一个形状,这只是带有圆形边缘的textView背景。 它实际上工作得很好,但当我参考形状时:Android 导致eclipse问题的可绘制形状,android,Android,我在一个可绘制的资源中定义了一个形状,这只是带有圆形边缘的textView背景。 它实际上工作得很好,但当我参考形状时: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" android:padding="10dp"> <solid andro
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
android:padding="10dp">
<solid android:color="#7C5B77"/>
<corners
android:bottomRightRadius="5dp"
android:bottomLeftRadius="15dp"
android:topLeftRadius="15dp"
android:topRightRadius="5dp"/>
</shape>
下面是my layout.xml文件的一个片段:
<TextView
android:layout_width="wrap_content"
android:text="Select Random Student"
android:textSize="15sp"
android:layout_height="wrap_content"
android:singleLine="true"
android:textColor="#E1E7DF"
android:background="@drawable/round_edittext_bkg"
android:layout_weight="1"/>
eclipse会抛出一个错误,尽管项目会构建和运行,并且看起来很好:
java.lang.UnsupportedOperationException
异常详细信息记录在窗口>显示视图>错误日志中
错误日志简单地说:
java.lang.UnsupportedOperationException
位于android.graphics.Path_Delegate.native_addRoundRectPath_Delegate.java:332
位于android.graphics.Path.native_addRoundRectPath.java
位于android.graphics.Path.addRoundRectPath.java:491
在android.graphics.drawable.GradientDrawable.drawGradientDrawable.java:330
最糟糕的是,当这种情况发生时,我不能在eclipse中使用图形布局。我必须手动编辑,除非我在模拟器中启动应用程序,否则无法看到布局
还有人对形状、xml和eclipse有此问题吗?此处报告的问题:
您可以尝试将视图更新为android 2.1 update1
或者使用android:radius而不是单个radius