Unexpected scopes found in folder 和 gradle-android-plugin-aspectjx 相容性bug
概述
有天你發現這個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
就可以了