Reputation: 2150
I just updated my android studio and ran into the following error.
Error:java.lang.RuntimeException: Unexpected scopes found in folder 'D:\****\****\****\app\build\intermediates\transforms\dexMerger\dev_demo\debug'. Required: EXTERNAL_LIBRARIES. Found: EXTERNAL_LIBRARIES, PROJECT, SUB_PROJECTS
I tried closing, cleaning and building but it won't work.
Anybody encountered the same problem ?
Upvotes: 10
Views: 2721
Reputation: 8446
It goes away if you downgrade the gradle plugin from 3.0.+ to 2.3.3. But still not the solution we need.
Upvotes: 3
Reputation: 796
Try This:
Android Studio
go to File>Project Structure>Project
and change the Gradle Version
to the latest version (4.4).Upvotes: 5
Reputation: 1289
I found a solution which works in my case. I deleted the .gradle and .idea folder from the application source directory and then re-run the app. It works fine for me.
I am not sure about the cause (might be related with studio cache), it works in my case.
Upvotes: 2
Reputation: 1523
Deleting the .gradle folder from the project folder fixed this for me.
Upvotes: 6