关于安卓压缩图片LuBan的NoClassDefFoundError解决办法
压缩图片我用了Luban 压缩
运行出现了
解决方案:
implementation 'top.zibin:Luban:1.1.5' implementation "com.android.support:exifinterface:27.1.1"
在导入依赖的时候应该再补上后面一个,这是因为android SDK最新的ExifInterface这个已经不在android.support.media.ExifInterface这个包里了,而在android.media.ExifInterface这个包里,而最新的这个包的使用必须minSdkVersion=24,所以要引入一个别的封装好的ExifInterface这个类。
附LuBan地址:https://github.com/Curzibn/Luban