启动后遇到AMSSdkTypeEnum相关崩溃应如何解决?

如果你遇到了java.lang.NoClassDefFoundError: Failed resolution of: Lcom/alibaba/sdk/android/utils/AMSDevReporter$AMSSdkTypeEnum;

一般是build.gradle配置有问题。可能是你配成了

  1. compile ('com.taobao.android:alisdk-hotfix:2.0.8') {
  2. transitive = false
  3. }

从而将相关依赖排除了,导致类找不到而报错。因此,可改为

  1. compile 'com.taobao.android:alisdk-hotfix:2.0.8'

若改完出现utdid包冲突,可再改为

  1. compile ('com.taobao.android:alisdk-hotfix:2.0.8') {
  2. exclude(module:'utdid4all')
  3. }