1.在项目的app下的bulid.gradle写:
repositories {
mavenCentral()
}
dependencies {
implementation ‘com.github.bumptech.glide:glide:4.11.0’
annotationProcessor ‘com.github.bumptech.glide:compiler:4.11.0’
}
右上角有个导入库,点击下自动导入库
2.在AndroidManifest.xml中写 ,设置权限网络连接
3.使用:
imageView = findViewById(R.id.imageView);
Glide.with(this).load(“http://img0.imgtn.bdimg.com/it/u=2389343769,219958581&fm=26&gp=0.jpg”).into(imageView);
图片地址一定是网上导航栏的地址
Android引用第三方库ImageView
最新推荐文章于 2021-05-26 11:38:11 发布