简体   繁体   中英

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 ?

从项目文件夹中删除.gradle文件夹为我修复了这个问题。

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).

在此输入图像描述

It goes away if you downgrade the gradle plugin from 3.0.+ to 2.3.3. But still not the soluton we need.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM