title: ActivityThread.performLaunchActivity(ActivityThread$ActivityClientRecord, Intent)
body: <p>As far as I can tell my app looks done and while its not bullet proof it should do the job for testing, but problem is when I build I get these errors.</p>
  
  <pre><code>Thread [&lt;1&gt; main] (Suspended (exception RuntimeException))  
  ActivityThread.performLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 1573    
  ActivityThread.handleLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 1667 
  ActivityThread.access$1500(ActivityThread, ActivityThread$ActivityClientRecord, Intent) line: 117   
  ActivityThread$H.handleMessage(Message) line: 935   
  ActivityThread$H(Handler).dispatchMessage(Message) line: 99 
  Looper.loop() line: 123 
  ActivityThread.main(String[]) line: 3691    
  Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]  
  Method.invoke(Object, Object...) line: 507  
  ZygoteInit$MethodAndArgsCaller.run() line: 847  
  ZygoteInit.main(String[]) line: 605 
  NativeStart.main(String[]) line: not available [native method]  
  </code></pre>
  
  <p>Here is my code <code>Main.java</code></p>
  
  <pre><code>package bitcoin.Virwox;
  
  import java.io.IOException;
  import java.io.InputStream;
  import java.math.BigDecimal;
  import java.text.NumberFormat;
  import java.util.Locale;
  import org.apache.http.HttpEntity;
  import org.apache.http.HttpResponse;
  import org.apache.http.client.ClientProtocolException;
  import org.apache.http.client.HttpClient;
  import org.apache.http.client.methods.HttpGet;
  import org.apache.http.impl.client.DefaultHttpClient;
  import org.json.JSONArray;
  import org.json.JSONException;
  import org.json.JSONObject;
  import android.app.Activity;
  import android.app.ProgressDialog;
  import android.os.Bundle;
  import android.util.Log;
  import android.view.View;
  import android.widget.CheckBox;
  import android.widget.TextView;
  
  public class Main extends Activity {
  
  //Variables
  ProgressDialog dialog = new ProgressDialog(null);
  JSONObject jArray = new JSONObject();
  int BTCSell;
  int GBPBuy;
  int Ammount;
  int BTCSLLAmmount;
  int GBPSLLAmmount;
  int Total;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);        
  }
  
  
  public void Start(View view) {
      dialog.setTitle("Please Wait");
      dialog.setIcon(R.drawable.icon);
      dialog.setMessage("Loading...");
      dialog.setIndeterminate(true);
      dialog.setCancelable(false);
      dialog.show();
  
      Ammount = Integer.valueOf(findViewById(R.id.Amountinputtxt).toString());
      GetInfo();
      Process();
  
      dialog.hide();
  }
  
  public void GetInfo() {
      try {
          BestBuySell();
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } catch (Exception e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
      final CheckBox checkBox = (CheckBox) findViewById(R.id.VirwoxFeeChk);
      if (checkBox.isChecked()) {
          ProcessEstimates();
          Total = GBPSLLAmmount; 
      }
      else {
              int holder;
              holder = BTCSell*Ammount;
              Total = (int)(holder/GBPBuy);
      }
  
  }
  
  private void ProcessEstimates() {
      try {
          BTCSLL();
      } catch (Exception e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
      try {
          GBPSLL();
      } catch (JSONException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }   
  
  }
  public void BTCSLL() throws Exception{
      //retrieve data for BTC&gt;SLL
      try {
          HttpClient httpclient = new DefaultHttpClient();
          String http = "http://api.virwox.com/api/json.php?method=estimateMarketOrder&amp;amount="+Ammount+"&amp;orderType=SELL&amp;instrument=BTC/SLL";     
          HttpGet httpget = new HttpGet(http);
          HttpResponse response = httpclient.execute(httpget);
          HttpEntity entity = response.getEntity();
  
          byte buffer[] = new byte[1024] ;
          InputStream is = entity.getContent() ;
          int numBytes = is.read(buffer) ;
          is.close();
  
          String entityContents = new String(buffer,0,numBytes) ;
          Log.d("xxx",entityContents);
  
          try {
              jArray = new JSONObject(entityContents);
  
          } catch (JSONException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
          finally{}
      } catch (ClientProtocolException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
      finally{}
  
      //Parse Data
      JSONArray  result = jArray.getJSONArray("result");
      //parse BTC&gt;SLL
      JSONObject f = result.getJSONObject(0);
      BTCSLLAmmount = Integer.parseInt(f.getString("amount"));
  }
  public void GBPSLL() throws JSONException{
  //retrieve data for SLL&gt;GBP
  try {
      HttpClient httpclient = new DefaultHttpClient();
      String http = "http://api.virwox.com/api/json.php?method=estimateMarketOrder&amp;amount="+BTCSLLAmmount+"&amp;orderType=BUY&amp;instrument=SLL/GBP";        
      HttpGet httpget = new HttpGet(http);
      HttpResponse response = httpclient.execute(httpget);
      HttpEntity entity = response.getEntity();
  
      byte buffer[] = new byte[1024] ;
      InputStream is = entity.getContent() ;
      int numBytes = is.read(buffer) ;
      is.close();
  
      String entityContents = new String(buffer,0,numBytes) ;
      Log.d("xxx",entityContents);
  
      try {
          jArray = new JSONObject(entityContents);
  
      } catch (JSONException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
      finally{}
  } catch (ClientProtocolException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  }
  finally{}
  
  //Parse Data
  JSONArray result = jArray.getJSONArray("result");
  //parse BTC&gt;SLL
  JSONObject e2 = result.getJSONObject(0);
  GBPSLLAmmount = Integer.parseInt(e2.getString("amount"));
  }
  
  public void Process() {
      CheckBox checkBox = (CheckBox) findViewById(R.id.PaypalFeeChk);
      if (checkBox.isChecked()) {            
          Total = Total - 1; 
      }
      TextView tv = (TextView)findViewById(R.id.Outputtxt);
      tv.setText("Total: £" + Total + ".00");
  
      CurrentRate();
  }
  
  public void CurrentRate(){
      float holder;
      holder = BTCSell/GBPBuy;
      BigDecimal payment = new BigDecimal(holder);
      NumberFormat n = NumberFormat.getCurrencyInstance(Locale.UK); 
      double doublePayment = payment.doubleValue();
      String s = n.format(doublePayment);
      TextView tv = (TextView)findViewById(R.id.CurrentRatetxt);
      tv.setText(s);
  }
  
  public void BestBuySell() throws Exception, IOException{
      //retrieve data
      try {
          HttpClient httpclient = new DefaultHttpClient();
  
          HttpGet httpget = new HttpGet("http://api.virwox.com/api/json.php?method=getBestPrices&amp;symbols[0]=BTC/SLL&amp;symbols[1]=GBP/SLL");
          HttpResponse response = httpclient.execute(httpget);
          HttpEntity entity = response.getEntity();
  
          byte buffer[] = new byte[1024] ;
          InputStream is = entity.getContent() ;
          int numBytes = is.read(buffer) ;
          is.close();
  
          String entityContents = new String(buffer,0,numBytes) ;
          Log.d("xxx",entityContents);
  
          try {
              jArray = new JSONObject(entityContents);
  
          } catch (JSONException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
          finally{}
      }
      finally{}   
      //parse info
      JSONArray  result = jArray.getJSONArray("result");
      //parse BTC&gt;SLL
      JSONObject e = result.getJSONObject(0);
      BTCSell = Integer.parseInt(e.getString("bestBuyPrice"));
      //Parse SLL&gt;GBP
      e = result.getJSONObject(1);
      GBPBuy = Integer.parseInt(e.getString("bestSellPrice"));
  }
  }
  </code></pre>
  
  <p>Here's the Layout <code>Main.xml</code></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;AbsoluteLayout android:id="@+id/widget43" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  &lt;TextView android:text="BTC-&amp;gt;GBP" android:textSize="45sp" android:layout_width="fill_parent" android:layout_height="78px" android:layout_x="1dip" android:layout_y="20dip" android:gravity="center_horizontal" android:id="@+id/Title"&gt;&lt;/TextView&gt;
  &lt;Button android:layout_width="350px" android:layout_height="wrap_content" android:layout_x="42dip" android:layout_y="298dip" android:text="Calculate" android:id="@+id/Button"&gt;&lt;/Button&gt;
  &lt;TextView android:textSize="15sp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_x="14dip" android:layout_y="388dip" android:text="Current Exchange rate: " android:id="@+id/Ratetxt"&gt;&lt;/TextView&gt;
  &lt;CheckBox android:checked="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_y="148dip" android:layout_x="190dip" android:text="Paypal Fee" android:id="@+id/PaypalFeeChk"&gt;&lt;/CheckBox&gt;
  &lt;CheckBox android:checked="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_x="190dip" android:layout_y="106dip" android:text="Virwox Fees" android:id="@+id/VirwoxFeeChk"&gt;&lt;/CheckBox&gt;
  &lt;TextView android:layout_x="182dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_y="388dip" android:textSize="15sp" android:id="@+id/CurrentRatetxt" android:text="£0.00"&gt;&lt;/TextView&gt;
  &lt;TextView android:layout_height="wrap_content" android:layout_x="1dip" android:layout_y="245dip" android:gravity="center" android:textSize="18sp" android:id="@+id/Outputtxt" android:text="£0.00" android:layout_width="fill_parent"&gt;&lt;/TextView&gt;
  &lt;EditText android:text="EditText" android:layout_width="200px" android:layout_height="wrap_content" android:layout_x="48dip" android:layout_y="126dip" android:numeric="integer" android:id="@+id/Amountinputtxt"&gt;&lt;/EditText&gt;
  &lt;/AbsoluteLayout&gt;
  </code></pre>
  
  <p>How is this caused and how can I solve this?</p>