java - Eclipse - Android app crashing -


i started learning how develop apps using eclipse, have made app , menu it. upon opening app, start screen supposed stay 5 seconds , move menu. after start screen app crashes. developing 4.1.2. log cat report following

05-08 13:46:21.170: v/mediaplayer(16864): message received msg=2, ext1=0, ext2=0  05-08 13:46:21.170: v/mediaplayer(16864): playback complete  05-08 13:46:21.170: v/mediaplayer(16864): callback application  05-08 13:46:21.170: v/mediaplayer(16864): callback  05-08 13:46:23.585: d/instrumentation(16864):  checkstartactivityresult  :intent { act=com.example.first_app.menu }  05-08 13:46:23.585: d/instrumentation(16864):  checkstartactivityresult  inent instance of inent:  05-08 13:46:23.590: w/dalvikvm(16864): threadid=11: thread exiting uncaught exception (group=0x40f122a0) 05-08 13:46:23.590: e/androidruntime(16864): fatal exception: thread-1262  05-08 13:46:23.590: e/androidruntime(16864): android.content.activitynotfoundexception: no  activity found handle intent { act=com.example.first_app.menu }  05-08 13:46:23.590: e/androidruntime(16864):    @   android.app.instrumentation.checkstartactivityresult(instrumentation.java:1580) 05-08 13:46:23.590: e/androidruntime(16864):    @   android.app.instrumentation.execstartactivity(instrumentation.java:1431) 05-08 13:46:23.590: e/androidruntime(16864):    @   android.app.activity.startactivityforresult(activity.java:3446) 05-08 13:46:23.590: e/androidruntime(16864):    @   android.app.activity.startactivityforresult(activity.java:3407) 05-08 13:46:23.590: e/androidruntime(16864):    @   android.app.activity.startactivity(activity.java:3617) 05-08 13:46:23.590: e/androidruntime(16864):    @   android.app.activity.startactivity(activity.java:3585) 05-08 13:46:23.590: e/androidruntime(16864):    @   com.example.first_app.splash$1.run(splash.java:28)  05-08 13:46:23.615: v/mediaplayer-jni(16864): release  05-08 13:46:23.615: v/mediaplayer(16864): setlistener  05-08 13:46:23.615: v/mediaplayer(16864): disconnect  05-08 13:46:23.620: v/mediaplayer(16864): destructor  05-08 13:46:23.620: v/mediaplayer(16864): disconnect 

my code

package com.example.first_app;  import android.app.listactivity; import android.content.intent; import android.os.bundle; import android.view.view; import android.widget.arrayadapter; import android.widget.listview;  public class menu extends listactivity{  string classes[] = {"startingpoint", "example1", "example2", "example3", "example4", "example5", "example6"};    @override protected void oncreate(bundle savedinstancestate) {     // todo auto-generated method stub     super.oncreate(savedinstancestate);     setlistadapter(new arrayadapter<string>(menu.this,         android.r.layout.simple_list_item_1, classes)); }   @override protected void onlistitemclick(listview l, view v, int position, long id) {     // todo auto-generated method stub     super.onlistitemclick(l, v, position, id);     string cheese = classes[position];     try{                         class ourclass = class.forname("com.example.first_app." + cheese);     intent ourintent = new intent(menu.this, ourclass);     startactivity(ourintent);     }catch(classnotfoundexception e){         e.printstacktrace();     } }    } 

and have manifest

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.first_app" android:versioncode="1" android:versionname="1.0" >  <uses-sdk     android:minsdkversion="8" />  <application     android:allowbackup="true"     android:icon="@drawable/ic_launcher"     android:label="@string/app_name"     android:theme="@style/apptheme" >     <activity         android:name=".splash"         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=".startingpoint"         android:label="@string/app_name" >         <intent-filter>             <action android:name="com.example.first_app" />             <category android:name="android.intent.category.default" />         </intent-filter>     </activity>     <activity         android:name=".menu"  android:label="@string/app_name" >         <intent-filter>             <action android:name="come.example.first_app.menu" />             <category android:name="android.intent.category.default" />         </intent-filter>     </activity> </application> </manifest> 

you have typo: <action android:name="**come**.example.first_app.menu" />

you meant type "com" not "come"

and fyi: way found in error log. line:

05-08 13:46:23.590: e/androidruntime(16864): android.content.activitynotfoundexception: no  

activity found handle intent { act=com.example.first_app.menu }

shows me in app trying create activity called "com.example.first_app.menu" activity not part of project. expected android manifest not have node @ all. found there typo. hope helps you.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -