T
T
timyr_murmur2021-01-09 14:35:05
Java
timyr_murmur, 2021-01-09 14:35:05

I can not display an error in my android application why?

I want to display an error that java gives me in my application, but it doesn’t give me how to fix the thiop is underlined in red and that’s it

catch (Exception e){
            System.out.print(e);
            tvLocationGPS.setText(e);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2021-01-10
@zagayevskiy

tvLocationGPS is obviously a TextView. Its setText method accepts a string or resource id. Exception, of course, is neither one nor the other.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question