I\'m running my project in AndroidStudio 3.2, but there is an error
FAILURE: Build failed with an exception.
* What went wrong:
Circular dependency between
As noted by @hocine-b in the comments, this may happen if you enable shrinkResources
in ProGuard.
It only occurs when Instant Run is enabled, i.e. in debug builds when you press the "Run" button.
You can fix it by only shrinking resources in release builds, for example, in your module's build.gradle
:
android {
buildTypes {
debug {
minifyEnabled true
shrinkResources false // Avoid conflicts with Instant Run
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Disable instant run from settings
Settings > search for instant run > uncheck "Enable Instant Run to hot swap code/resource changes on display"