8

有人可以解释这个错误吗?

"SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length".

我认为它与editText. 有解决办法吗?

这是我的日志。

1-07 14:29:47.654: D/OpenGLRenderer(24479): Enabling debug mode 0

01-07 14:30:36.954: E/SensorManager(24479): thread start

01-07 14:30:36.959: D/SensorManager(24479): registerListener :: handle = 0  name= LSM330DLC 3-axis Accelerometer delay= 200000 Listener= 
android.view.OrientationEventListener$SensorEventListenerImpl@43000e98

01-07 14:30:37.139: E/SpannableStringBuilder(24479): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length

01-07 14:30:37.139: E/SpannableStringBuilder(24479): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length

01-07 14:30:37.419: I/Process(24479): Sending signal. PID: 24479 SIG: 9
01-07 14:30:37.654: E/Trace(25014): error opening trace file: No such file or directory (2)

01-07 14:30:37.754: D/dalvikvm(25014): GC_FOR_ALLOC freed 108K, 6% free 12258K/12931K, paused 15ms, total 16ms

01-07 14:30:37.754: I/dalvikvm-heap(25014): Grow heap (frag case) to 14.860MB for 2457616-byte allocation

01-07 14:30:37.779: D/dalvikvm(25014): GC_CONCURRENT freed 6K, 5% free 14651K/15367K, paused 12ms+2ms, total 23ms

01-07 14:30:37.809: D/dalvikvm(25014): GC_FOR_ALLOC freed 0K, 5% free 14651K/15367K, paused 11ms, total 11ms

01-07 14:30:37.819: I/dalvikvm-heap(25014): Grow heap (frag case) to 19.018MB for 4367376-byte allocation

01-07 14:30:37.834: D/dalvikvm(25014): GC_CONCURRENT freed 0K, 4% free 18917K/19655K, paused 2ms+2ms, total 16ms

01-07 14:30:37.834: D/dalvikvm(25014): WAIT_FOR_CONCURRENT_GC blocked 3ms

01-07 14:30:37.894: D/dalvikvm(25014): GC_FOR_ALLOC freed 2660K, 17% free 17674K/21063K, paused 13ms, total 13ms

01-07 14:30:37.909: D/dalvikvm(25014): GC_FOR_ALLOC freed 688K, 14% free 18212K/21063K, paused 10ms, total 10ms

01-07 14:30:37.944: D/dalvikvm(25014): GC_FOR_ALLOC freed <1K, 11% free 18890K/21063K, paused 12ms, total 12ms

01-07 14:30:37.949: I/dalvikvm-heap(25014): Grow heap (frag case) to 20.170MB for 1235556-byte allocation

01-07 14:30:37.964: D/dalvikvm(25014): GC_FOR_ALLOC freed 0K, 10% free 20097K/22279K, paused 11ms, total 11ms

01-07 14:30:38.019: D/libEGL(25014): loaded /system/lib/egl/libEGL_mali.so

01-07 14:30:38.024: D/libEGL(25014): loaded /system/lib/egl/libGLESv1_CM_mali.so

01-07 14:30:38.024: D/libEGL(25014): loaded /system/lib/egl/libGLESv2_mali.so

01-07 14:30:38.029: D/(25014): Device driver API match

01-07 14:30:38.029: D/(25014): Device driver API version: 10

01-07 14:30:38.029: D/(25014): User space API version: 10

01-07 14:30:38.029: D/(25014): mali: REVISION=Linux-r2p4-02rel0 BUILD_DATE=Fri Sep 28 

10:42:56 KST 2012 

01-07 14:30:38.064: D/OpenGLRenderer(25014): Enabling debug mode 0
4

5 回答 5

21

只需将此属性添加到您的编辑文本中,您的问题肯定会得到解决

android:inputType="textNoSuggestions"

将上述属性添加到应用程序中使用的每个编辑文本中,或者仅添加到该编辑文本中出现错误的位置。

于 2013-04-04T04:05:06.040 回答
8

这可能是因为您使用的是3rd 方键盘而不是本机手机键盘。这经常发生在SwiftKey上。

于 2015-02-17T05:24:40.383 回答
2

只是忽略他们。这是因为你的操作系统可能有一些新的键盘,比如 Swype,或者其他一些定制的键盘,这些东西就会出现。所以你不必担心。

于 2013-07-02T06:01:31.833 回答
2

检查在与遇到的屏幕相对应的活动 xml 文件中是否有任何元素,例如按钮或文本视图重复(复制两次)。我没有注意到这一点,不得不面对同样的问题。

于 2014-01-10T20:24:00.120 回答
0

在editText中添加android:textIsSelectable="false"例如

  <EditText
                    android:id="@+id/edit_IONumber"
                    android:layout_width="0dp"
                    android:layout_weight="3"
                    android:layout_marginTop="10dp"
                    android:layout_marginRight="10dp"
                    android:textIsSelectable="false"
                    android:layout_height="wrap_content"
                    android:background="@drawable/edit_text_shape"
                    android:padding="5dip" />
于 2017-10-18T12:17:33.607 回答