Piasy / BigImageViewer

Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling Scale Image View, Fresco, Glide, and Picasso. Even with gif and webp support! 🍻
MIT License
3.98k stars 401 forks source link

android.view.InflateException: Binary XML file line #191: Error inflating class com.github.piasy.biv.view.BigImageView #189

Closed yihu5566 closed 4 years ago

yihu5566 commented 4 years ago

android.view.InflateException: Binary XML file line #191: Binary XML file line #191: Error inflating class com.github.piasy.biv.view.BigImageView Caused by: android.view.InflateException: Binary XML file line #191: Error inflating class com.github.piasy.biv.view.BigImageView Caused by: java.lang.reflect.InvocationTargetException ..省略.. Caused by: java.lang.IllegalStateException: You must initialize BigImageViewer before use it! at com.github.piasy.biv.BigImageViewer.imageLoader(BigImageViewer.java:52) at com.github.piasy.biv.view.BigImageView.<init>(BigImageView.java:174) at com.github.piasy.biv.view.BigImageView.<init>(BigImageView.java:139) ... 72 more

场景 : 在fragment中使用BigImageView报错如上. 问题: 错误信息是未初始化BigImageView. 解决:将初始化代码提前到onCreateView()方法前面.直接放到onCreate()中即可

Piasy commented 4 years ago

请问你提这个 issue 的目的是?

yihu5566 commented 4 years ago

就是做个记录的