bug日记-Unexpected scopes found in folder 和 gradle-android-plugin-aspectjx 兼容性bug

镇楼

这么懵逼的bug,得压压惊


image

概述

有天你发现这个bug 无缘无故的就出现了,一脸懵逼,全部报错信息如下

Caused by: java.lang.RuntimeException: Unexpected scopes found in folder '/Users/test/Developer/webworkspace/Android/MicroCredit/app/build/intermediates/transforms/dexMerger/banger/debug'. Required: EXTERNAL_LIBRARIES. Found: EXTERNAL_LIBRARIES, PROJECT, SUB_PROJECTS
    at com.android.build.gradle.internal.pipeline.IntermediateFolderUtils.makeRestrictedCopies(IntermediateFolderUtils.java:455)

原因分析

这是 aop插件gradle-android-plugin-aspectjx兼容,在 github上已经有人提交过这个 issue。那么重点是怎么解决呢?

解决方案

在github 上有人提出了解决方案,虽然不是最完美的解决方案,但很有效。希望早日解决这个issue。

I found a solution which works in my case.
I deleted the .gradle and .idle folder from the studio and then re-run the app.
it works fine for me

简单来说就是删除.idea 和.gradle 文件夹,然后重新编译app就可以了

你可能感兴趣的:(bug日记-Unexpected scopes found in folder 和 gradle-android-plugin-aspectjx 兼容性bug)