Unable to execute dex: method ID not in [0, 0xffff]: 65536

前端 未结 12 2197
独厮守ぢ
独厮守ぢ 2020-11-21 18:48

I have seen various versions of the dex erros before, but this one is new. clean/restart etc won\'t help. Library projects seems intact and dependency seems to be linked cor

12条回答
  •  攒了一身酷
    2020-11-21 19:19

    gradle + proguard solution:

    afterEvaluate {
      tasks.each {
        if (it.name.startsWith('proguard')) {
            it.getInJarFilters().each { filter ->
                if (filter && filter['filter']) {
                    filter['filter'] = filter['filter'] +
                            ',!.readme' +
                            ',!META-INF/LICENSE' +
                            ',!META-INF/LICENSE.txt' +
                            ',!META-INF/NOTICE' +
                            ',!META-INF/NOTICE.txt' +
                            ',!com/google/android/gms/ads/**' +
                            ',!com/google/android/gms/cast/**' +
                            ',!com/google/android/gms/games/**' +
                            ',!com/google/android/gms/drive/**' +
                            ',!com/google/android/gms/wallet/**' +
                            ',!com/google/android/gms/wearable/**' +
                            ',!com/google/android/gms/plus/**' +
                            ',!com/google/android/gms/topmanager/**'
                }
            }
        }
      }
    }
    

提交回复
热议问题