Note that there are some explanatory texts on larger screens.

plurals
  1. POStarting another activity in Handler#postDelayed(Runnable, long) yields "SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length"
    primarykey
    data
    text
    <p>When I start an activity in <code>Handler#postDelayed(Runnable, long)</code> I get an error log message (yes, repeated twice):</p> <pre><code>03-19 18:39:26.628: E/SpannableStringBuilder(11502): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length 03-19 18:39:26.628: E/SpannableStringBuilder(11502): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length </code></pre> <p>Application does not crash, however it is annoying to see this error all the time. I get no other output in the LogCat in this example.</p> <p>My first activity:</p> <pre><code>public class ActivityOne extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); startActivityTwoDelayed(); } private void startActivityTwoDelayed() { new Handler().postDelayed(new Runnable() { @Override public void run() { Intent captureIntent = new Intent(ActivityOne.this, ActivityTwo.class); startActivity(captureIntent); } }, 1000); } } </code></pre> <p>My second activity:</p> <pre><code>public class ActivityTwo extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } } </code></pre> <p>My manifest:</p> <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.test03" android:versionCode="1" android:versionName="1.0" &gt; &lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" /&gt; &lt;application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" &gt; &lt;activity android:name=".ActivityOne" android:label="@string/title_activity_main" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;activity android:name=".ActivityTwo" android:label="@string/title_activity_main" &gt; &lt;/activity&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload