bad bitmap error when setting Uri

后端 未结 6 1868
暗喜
暗喜 2021-02-19 12:00

I would like to make an ImageView display an image on a website. So I create a new ImageView and execute imgView.setImageURI(uri);

When I launch the app the

6条回答
  •  滥情空心
    2021-02-19 12:37

    Use library Picasso

    Manifest

    uses-permission android:name="android.permission.INTERNET"

    build gradle

    implementation 'com.squareup.picasso:picasso:2.71828'

    Activity:

    Picasso.get().load(photoUrl).into(imageView);

提交回复
热议问题