android - unfortunately app has stopped in emulator -


this mainactivity program.when run code emulator shows unforunately app has stopprd.please post solution this.thanks in advance.....i got error many application.so answer me overcome remaining issues........

    package com.example.tab;  import android.app.activity; import android.content.res.resources; import android.net.http.androidhttpclient; import android.os.bundle; import android.widget.tabhost; import android.widget.tabhost.tabspec; public class mainactivity extends activity {     private tabspec tspec;     private tabhost tabhost;     /** called when activity first created. */     @override     public void oncreate(bundle icicle) {         super.oncreate(icicle);         setcontentview(r.layout.activity_main);         tabhost=(tabhost)findviewbyid(r.id.my_tabhost);         tabhost.setup();         resources res=getresources();         tspec=tabhost.newtabspec("tab1");         tspec.setcontent(r.id.clock);         tspec.setindicator("clock");         tabhost.addtab(tspec);         tspec=tabhost.newtabspec("tab2");         tspec.setcontent(r.id.calendar);         tspec.setindicator("calendar");         tabhost.addtab(tspec);         tspec=tabhost.newtabspec("tab3");         tspec.setcontent(r.id.date);         tspec.setindicator("date");         tabhost.addtab(tspec);        } 

this manifest file:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.example.tab"     android:versioncode="1"     android:versionname="1.0" >      <uses-sdk         android:minsdkversion="12"         android:targetsdkversion="17" />      <application         android:allowbackup="true"         android:icon="@drawable/ic_launcher"         android:label="@string/app_name"         android:theme="@style/apptheme" >         <activity             android:name="com.example.tab.mainactivity"             android:label="@string/app_name" >             <intent-filter>                 <action android:name="android.intent.action.main" />                  <category android:name="android.intent.category.launcher" />             </intent-filter>         </activity>     </application>  </manifest> 


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -