glide与jetpack冲突的问题
时间
2019-1-2问题描述
glide compier生成的class文件中@NonNull注解的包名依然是
android.support.annotation.*
会提示android.support.annotation.NonNull 未找到
实际上该类已迁移到androidx.annotation.nonnull
解决办法
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'androidx.annotation:annotation:1.0.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
android.enableJetifier=true
android.useAndroidX=true
亲测有效
原文地址: 《解决glide与jetpack冲突的问题》[https://www.jianshu.com/p/3a1c89bf1bee), 转载请注明出处
提示找不到部分jar包里面的旧support包方法
- 时间 2019-5-17
- 问题描述
一些私有的jar包引继承了旧support包类,例如fragment,不知为何jetifier对这些jar包没有生效,但是编译没有问题,AndroidStudio提示 cant resovle method - 解决办法
去这里
下载stand-alone版的jetifier,对jar包里的引用类进行手动转换,生成新包替换旧的jar包, usage:
./jetifier-standalone -i <source-library> -o <output-library>
- 问题描述
Failed to transform file 'dagger-compiler-2.5.jar' to match attributes {artifactType=processed-jar} using transform JetifyTransform
解决办法:
升级dagger到2.20