eclipse - Android Manifest change force closes app -


i added class working app. want new class first page load, called dashboard.class. added manifest , app force closes when try load it. went , removed entry in manifest , app worked again. please tell me doing wrong

     <activity         android:name="com.magicbuddy.gamble.dashboard"         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="com.magicbuddy.gamble.mainactivity"         android:label="@string/app_name" >         <intent-filter>             <action android:name="com.magicbuddy.gamble.mainactivity" />              <category android:name="android.intent.category.default" />         </intent-filter>     </activity> 

the dashboard new class added. when remove , reset mainactivity launcher , main, app work fine again.

i tried posted solutions of removing intent-filter , still crashing. here logcat **also thank guys replys

01-31 13:56:38.709: d/androidruntime(1995): shutting down vm 01-31 13:56:38.709: w/dalvikvm(1995): threadid=1: thread exiting uncaught exception (group=0xb2eda288) 01-31 13:56:38.709: e/androidruntime(1995): fatal exception: main 01-31 13:56:38.709: e/androidruntime(1995): java.lang.runtimeexception: unable start activity componentinfo{com.magicbuddy.gamble/com.magicbuddy.gamble.dashboard}: java.lang.classcastexception: android.widget.imagebutton cannot cast android.widget.button 01-31 13:56:38.709: e/androidruntime(1995): @ android.app.activitythread.performlaunchactivity(activitythread.java:2059) 01-31 13:56:38.709: e/androidruntime(1995): @ android.app.activitythread.handlelaunchactivity(activitythread.java:2084) 01-31 13:56:38.709: e/androidruntime(1995): @ android.app.activitythread.access$600(activitythread.java:130) 01-31 13:56:38.709: e/androidruntime(1995): @ android.app.activitythread$h.handlemessage(activitythread.java:1195) 01-31 13:56:38.709: e/androidruntime(1995): @ android.os.handler.dispatchmessage(handler.java:99) 01-31 13:56:38.709: e/androidruntime(1995): @ android.os.looper.loop(looper.java:137) 01-31 13:56:38.709: e/androidruntime(1995): @ android.app.activitythread.main(activitythread.java:4745) 01-31 13:56:38.709: e/androidruntime(1995): @ java.lang.reflect.method.invokenative(native method) 01-31 13:56:38.709: e/androidruntime(1995): @ java.lang.reflect.method.invoke(method.java:511) 01-31 13:56:38.709: e/androidruntime(1995): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:786) 01-31 13:56:38.709: e/androidruntime(1995): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:553) 01-31 13:56:38.709: e/androidruntime(1995): @ dalvik.system.nativestart.main(native method) 01-31 13:56:38.709: e/androidruntime(1995): caused by: java.lang.classcastexception: android.widget.imagebutton cannot cast android.widget.button 01-31 13:56:38.709: e/androidruntime(1995): @ com.magicbuddy.gamble.dashboard.oncreate(dashboard.java:25) 01-31 13:56:38.709: e/androidruntime(1995): @ android.app.activity.performcreate(activity.java:5008) 01-31 13:56:38.709: e/androidruntime(1995): @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1079) 01-31 13:56:38.709: e/androidruntime(1995): @ android.app.activitythread.performlaunchactivity(activitythread.java:2023)

i added class has 4 buttons on , each button has image. want load first logcat error when try make happen

according logcat exception is:

java.lang.classcastexception: android.widget.imagebutton cannot cast android.widget.button

this happening in oncreate() method of dashboard activity. casting imagebutton button. problem not in manifest in class itself.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -