Why this Error occurred? java.lang.RuntimeException: ImageLoader must be init with configuration before using

后端 未结 2 1929
伪装坚强ぢ
伪装坚强ぢ 2021-01-04 08:31

I have downloaded one ImageDownloader code from gitHub(from Here) Now when I am trying to download the image from my webservice I am getting this Runtime Exception \"ImageLo

2条回答
  •  無奈伤痛
    2021-01-04 09:26

    protected ImageLoader imageLoader;
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    
    imageLoader = ImageLoader.getInstance();
    imageLoader.init(ImageLoaderConfiguration.createDefault(this));
    

提交回复
热议问题