Android throwing up Error using jtwitter
<p>I am trying to write a twitter application on Android target 2.2 (using some sample code that I found on the net and using Marko Gargenta's O'Reilly text). I am stuck with the problem as in the log below. The source code is given first followed by the log. Any idea what's going wrong here ? Also does anyone have or can point to a sample jtwitter code working on Android.</p>

<p>Thanks,
Ravi</p>

<hr>

<pre><code>protected String doInBackground(String... statuses) {
  try {

         //Autho information
         /*OAuthSignpostClient oauthclient = new OAuthSignpostClient(cons_key, 
           cons_secret, access_token, access_secret);*/

         OAuthSignpostClient oauthclient = new OAuthSignpostClient(access_token, access_secret,"oob");

         //***POSTING TO TWITTER CURRENTLY DOES NOT WORK WITH THIS INTERFACE
         twitter = new Twitter(mytwitterusername, oauthclient);
         //twitter.setAPIRootUrl("http://learningandroid.status.net/api");

   //***POSTING TO TWITTER CURRENTLY DOES NOT WORK WITH THIS INTERFACE
   Log.i(Logtag, "Status currently is " + statuses[0]);

   Twitter.Status status = twitter.updateStatus(statuses[0]);
   //return status.text;
   return statuses[0];
  } catch (TwitterException e) {
   Log.e(Logtag, e.toString());
   e.printStackTrace();
   return "Failed to post to Twitter";
  }
</code></pre>

<p>}</p>

<hr>

<h2>Log file:</h2>

<pre><code>E/dalvikvm(  719): Could not find method javax.swing.JOptionPane.showInputDialog, referenced from method winterwell.jtwi
tter.OAuthSignpostClient.askUser
W/dalvikvm(  719): VFY: unable to resolve static method 443: Ljavax/swing/JOptionPane;.showInputDialog (Ljava/lang/Objec
t;)Ljava/lang/String;
W/dalvikvm(  719): VFY:  rejecting opcode 0x71 at 0x0000
W/dalvikvm(  719): VFY:  rejected Lwinterwell/jtwitter/OAuthSignpostClient;.askUser (Ljava/lang/String;)Ljava/lang/Strin
g;
W/dalvikvm(  719): Verifier rejected class Lwinterwell/jtwitter/OAuthSignpostClient;
W/dalvikvm(  719): threadid=17: thread exiting with uncaught exception (group=0x4000fe70)
E/AndroidRuntime(  719): Uncaught handler: thread AsyncTask #1 exiting due to uncaught exception
E/AndroidRuntime(  719): java.lang.RuntimeException: An error occured while executing doInBackground()
E/AndroidRuntime(  719):        at android.os.AsyncTask$3.done(AsyncTask.java:200)
E/AndroidRuntime(  719):        at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:234)
E/AndroidRuntime(  719):        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:258)
E/AndroidRuntime(  719):        at java.util.concurrent.FutureTask.run(FutureTask.java:122)
E/AndroidRuntime(  719):        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:648)
E/AndroidRuntime(  719):        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:673)
E/AndroidRuntime(  719):        at java.lang.Thread.run(Thread.java:1058)
E/AndroidRuntime(  719): Caused by: java.lang.VerifyError: winterwell.jtwitter.OAuthSignpostClient
E/AndroidRuntime(  719):        at com.ravi.tweeto.StatusActivity$PostToTwitter.doInBackground(StatusActivity.java:81)
E/AndroidRuntime(  719):        at com.ravi.tweeto.StatusActivity$PostToTwitter.doInBackground(StatusActivity.java:1)
E/AndroidRuntime(  719):        at android.os.AsyncTask$2.call(AsyncTask.java:185)
E/AndroidRuntime(  719):        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:256)
E/AndroidRuntime(  719):        ... 4 more
I/Process (  585): Sending signal. PID: 719 SIG: 3
I/dalvikvm(  719): threadid=7: reacting to signal 3
I/dalvikvm(  719): Wrote stack trace to '/data/anr/traces.txt'
----
</code></pre>
