Android App Crashes on Button Click

前端 未结 4 364
野性不改
野性不改 2021-01-26 05:54

I have been attempting to make my first android application (a simple temperature converter) in Eclipse, but when I click the button on my phone the app crashes. Here is the ful

4条回答
  •  孤城傲影
    2021-01-26 06:26

    You need to cast output to String

    myTextView.setText(String.valueOf(output));
    

    setText method is overloaded and when You pass an integer to it it expects it to be an id of resource.

提交回复
热议问题