如果你遇到了java.lang.NoClassDefFoundError: Failed resolution of: Lcom/alibaba/sdk/android/utils/AMSDevReporter$AMSSdkTypeEnum;
一般是build.gradle配置有问题。可能是你配成了
- [backcolor=transparent]compile [backcolor=transparent]([backcolor=transparent]'com.taobao.android:alisdk-hotfix:2.0.8'[backcolor=transparent])[backcolor=transparent] [backcolor=transparent]{
- [backcolor=transparent] transitive [backcolor=transparent]=[backcolor=transparent] [backcolor=transparent]false
- [backcolor=transparent]}
从而将相关依赖排除了,导致类找不到而报错。因此,可改为
- [backcolor=transparent]compile [backcolor=transparent]'com.taobao.android:alisdk-hotfix:2.0.8'
若改完出现utdid包冲突,可再改为
- [backcolor=transparent]compile [backcolor=transparent]([backcolor=transparent]'com.taobao.android:alisdk-hotfix:2.0.8'[backcolor=transparent])[backcolor=transparent] [backcolor=transparent]{
- [backcolor=transparent] exclude[backcolor=transparent]([backcolor=transparent]module[backcolor=transparent]:[backcolor=transparent]'utdid4all'[backcolor=transparent])
- [backcolor=transparent]}