I wrote a code as shown below to print stack trace. I am using eclipse IDE. I am unable to view the stack trace. I checked in console and logcat.
catch (Exception ex)
{
//Exception handling
ex.printStackTrace();
Log.e("error in uploading", ex.getMessage());
}
I logcat exception stack traces with...
catch (IOException e)
{
Log.w(TAG, "IOException: " + Log.getStackTraceString(e));
}
Is multiple devices showing in your DDMS=>Devices tab? If this is the case then select the device you are running your application. LogCat shows logging from one device at a time
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.