1

I found a bit of help here, but nothing substantial.

I've successfully moved my Android project from Eclipse to IntelliJ IDEA, and am trying to get used to the UI. I've set it up to build and run, but when I throw an exception, I can't figure out how to view the stack trace like Eclipse presents it.

For example, running this in Eclipse:

((TextView)findViewById(R.id.abs__action_bar)).setText("Temp");

Yields the following, in Eclipse's "LogCat" View:

E/AndroidRuntime(341): FATAL EXCEPTION: main
E/AndroidRuntime(341): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appname/com.appname.activity.HomeActivity}: java.lang.ClassCastException: com.actionbarsherlock.internal.widget.ActionBarView
E/AndroidRuntime(341):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
E/AndroidRuntime(341):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
E/AndroidRuntime(341):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime(341):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
E/AndroidRuntime(341):  at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(341):  at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(341):  at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime(341):  at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(341):  at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(341):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime(341):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime(341):  at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(341): Caused by: java.lang.ClassCastException: com.actionbarsherlock.internal.widget.ActionBarView
E/AndroidRuntime(341):  at com.appname.activity.HomeActivity.init(HomeActivity.java:150)
E/AndroidRuntime(341):  at com.appname.activity.HomeActivity.access$0(HomeActivity.java:127)
E/AndroidRuntime(341):  at com.appname.activity.HomeActivity$1.execute(HomeActivity.java:111)
E/AndroidRuntime(341):  at com.appname.helper.Security.checkCredentialsAndLogin(Security.java:139)
E/AndroidRuntime(341):  at com.appname.activity.HomeActivity.onCreate(HomeActivity.java:118)
E/AndroidRuntime(341):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime(341):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
E/AndroidRuntime(341):  ... 11 more

Whereas in IntelliJ I just get something that looks like this, when I "Debug ProjectName", after enabling "Break on all Exceptions":

enter image description here

Community
  • 1
  • 1
Josh
  • 12,448
  • 10
  • 74
  • 118

1 Answers1

2

IntelliJ IDEA has a separate Android Logcat tab, exceptions are logged there. If you are targeting 4.1 Platform, make sure to use IDEA 11.1.3 which provides compatibility for the recent changes in Logcat.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904