None of my apps work in the emulator. I am running Ubuntu 9.10 and everytime I try to access my UI, the app crashes. All I get is an "Sorry! The application ... has stopped unexpectedly". For EVERY app this happens.
package com.mohit.helloandroid;
import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;
public class HelloAndroid extends TabActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Resources res = getResources(); //Resource object to get drawables
TabHost tabHost = getTabHost(); //The activity tabhost
TabHost.TabSpec spec; //Reusable tab spec
Intent intent;
intent = new Intent().setClass(this, HelloAndroid.class);
spec = tabHost.newTabSpec("artists").setIndicator("Artists", res
.getDrawable(R.drawable.tab_artists))
.setContent(intent);
tabHost.addTab(spec);
}
}
I don't know how this code could possibly throw a message like that.