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

前端 未结 3 1703
礼貌的吻别
礼貌的吻别 2020-12-22 13:21

I get the following error:

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

I don\'t know how t

相关标签:
3条回答
  • 2020-12-22 14:11

    As seeing your Logcat their is ClassCastException coming. this means you are casting to something which is not correct. Casting means changing datatype Like casting int to string or something like this. you should post your entire code. Pls check for anything related to casting Hope this solve your problem.

    0 讨论(0)
  • 2020-12-22 14:20

    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);     
     }
    
    0 讨论(0)
  • 2020-12-22 14:25

    As per your error, you should be declared activity speak1 in manifest file. Then clean and build your project.

    Be sure speat1 extends Activity also.

    0 讨论(0)
提交回复
热议问题