How to set a Image to a Image View from a URL Android

前端 未结 4 1875
Happy的楠姐
Happy的楠姐 2021-01-20 04:20

I am trying to download and show a image in my imageview from URL that i will get dyncamically .I have tried this way

 URL url = new URL(parsedWeatherRespo         


        
4条回答
  •  说谎
    说谎 (楼主)
    2021-01-20 05:18

    You're getting NetworkOnMainThreadException which indicates that you're performing network operation on main thread, while it should be performed in other thread.

    Follow this question for further information: How to fix android.os.NetworkOnMainThreadException?

提交回复
热议问题