Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid force close with JodaTime
    primarykey
    data
    text
    <p>Has anybody used jodatime with android? I'm getting a force close with no trace. </p> <pre><code>package test.journal.help; import java.util.Date; import org.joda.time.DateTime; import org.joda.time.Days; import android.app.Activity; import android.os.Bundle; public class journaltester extends Activity { /** Called when the activity is first created. */ private Date today = new Date(); public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Days days = Days.daysBetween(new DateTime(today), new DateTime(today)); setContentView(R.layout.main); } } </code></pre> <p>Value of today : "Sat Aug 07 00:00:00 America/New_York 2010"</p> <p>alright making some progress... getting a stackoverflow error at org.joda.time.DateTimeZone.getDefault() according to kiwidoc this is caused if zone is null.</p> <pre><code> public static DateTimeZone getDefault() { DateTimeZone zone = cDefault; if (zone == null) { synchronized(DateTimeZone.class) { zone = cDefault; if (zone == null) { DateTimeZone temp = null; try { try { temp = forID(System.getProperty("user.timezone")); } catch (RuntimeException ex) { // ignored } if (temp == null) { temp = forTimeZone(TimeZone.getDefault()); } } catch (IllegalArgumentException ex) { // ignored } if (temp == null) { temp = UTC; } cDefault = zone = temp; } } //LINE 147 } return zone; } </code></pre> <p>Heres the stack:</p> <pre><code>Thread [&lt;3&gt; main] (Suspended (exception StackOverflowError)) DateTimeZone.getDefault() line: 147 ISOChronology.getInstance() line: 86 DateTimeUtils.getChronology(Chronology) line: 231 DateConverter(AbstractConverter).getChronology(Object, Chronology) line: 82 DateTime(BaseDateTime).&lt;init&gt;(Object, Chronology) line: 170 DateTime.&lt;init&gt;(Object) line: 168 PlantsCursorAdapter.newView(Context, Cursor, ViewGroup) line: 71 PlantsCursorAdapter(CursorAdapter).getView(int, View, ViewGroup) line: 182 </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.
 

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