android - FATAL ERROR : main have you declared this activity in your AndroidManifest.xml? -


i following error:

fatal error : main have declared activity in androidmanifest.xml?

i don't know how declare activity. androidmanifest.xml

 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="info.androidhive.slidingmenu"     android:versioncode="1"     android:versionname="1.0" >      <uses-sdk         android:minsdkversion="11"         android:targetsdkversion="17" />      <application         android:allowbackup="true"         android:icon="@drawable/ic_launcher"         android:label="@string/app_name"         android:theme="@style/apptheme" >         <activity             android:name="info.androidhive.slidingmenu.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>         <activity              android:name="info.androidhive.slidingmenu.speak1"/>     </application> <uses-permissions></uses-permissions> </manifest> 

where should put declaration of activity? , speak1.java *i've edited speak1.java

package info.androidhive.slidingmenu;     import android.app.activity; import android.os.bundle; import android.view.layoutinflater; import android.view.view; import android.view.viewgroup;  public class speak1 extends activity {       @override         protected void oncreate(bundle savedinstancestate) {             // todo auto-generated method stub             super.oncreate(savedinstancestate);             setcontentview(r.layout.speak1);           }      } 

as in log not declaring speak1 activity in androidmanifest.xml. add speak1 activity in manifest using activity attribute :

 <activity         android:name="info.androidhive.slidingmenu.speak1" /> 

edit:

public class speak1 extends activity {   @override     protected void oncreate(bundle savedinstancestate) {         // todo auto-generated method stub         super.oncreate(savedinstancestate);         setcontentview(r.layout.speak1);       } 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -