how to catch android force to close
Now i am working json application.The Force close message occured the app is crosed. so
how to catch force to close e开发者_运维问答rror in try catch exception.Help me.....
put log.d commands everywhr and check the log messages in the log view....
open window > Android > Log
While defining your message give : throws JSONException and put the code that raises exception inside try block. After try block, give Catch statement as :
catch(Exception e) {
throw new JSONException(e.getMessage());
}
If you're trying to avoid surround all cod with try/catch blocks, you can use thread.setUncaughtExceptionHandler Check it out
Another way is to use ACRA to get logs Error from your APP, ACRA
精彩评论