Sebastien FERRAND
Sebastien FERRAND

Reputation: 2150

New android studio flavor

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

Answers (4)

Irshu
Irshu

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

Tricky Bay
Tricky Bay

Reputation: 796

Try This:

  1. Delete the .gradle folder from the project folder
  2. In Android Studio go to File>Project Structure>Project and change the Gradle Version to the latest version (4.4).

enter image description here

Upvotes: 5

Arpit
Arpit

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

Erik Browne
Erik Browne

Reputation: 1523

Deleting the .gradle folder from the project folder fixed this for me.

Upvotes: 6

Related Questions