android - trying to call activity from my main activity as follow -



android - trying to call activity from my main activity as follow -

@override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); button sendbtn=(button)findviewbyid(r.id.button1); sendbtn.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { // todo auto-generated method stub intent intent=new intent(mainactivity.this,send.class); startactivity(intent); } }); }

i have button on button click want open sec activity named send app unfortunately stopped logcat showing error this:

04-07 13:39:33.040: e/androidruntime(2426): android.content.activitynotfoundexception: unable find explicit activity class {com.send/com.send.send}; have youdeclared activity in androidmanifest.xml?

1.go mainfiest.xml class , check have registered bundle or not..if not declared activity ex:

<activity android:name="package name.class name" android:label="@string/app_name" > </activity> **or** <activity android:name=".class name" android:label="@string/app_name" > </activity>

android arrays android-intent

Comments

Popular posts from this blog

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -