3
votes

Surprisingly, my project is completely written and developed in Java only, it's also not containing any dependencies declared for Kotlin. Yet I'm receiving this weird error:

A problem occurred configuring project ':app'.

Configuration:

When I use the below configuration, it works perfectly fine, builds the project and the app gets installed on my device/emulator:

Android Studio Version: 3.1 Stable release

Gradle Plugin Version: 3.0.1

Gradle Distribution URL:

distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

BUT When I use the latest configuration declared below, the error occurs while running the app as shown in the images:

Android Studio Version: 3.1 Stable release

Gradle Plugin Version: 3.1.0

Gradle Distribution URL:

distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

Steps I've followed/things I've tried:

  1. Clean Project
  2. Rebuild Project
  3. Sync Project
  4. Deleting build folder from project tree
  5. Checked that project doesn't contain any names, references or declarations missing
  6. Invalidate Caches/Restart
  7. Check the whole dependency tree to make sure any Kotlin dependency is not imported or used as my project doesn't make use of Kotlin language

None of the above have worked!

2

2 Answers

1
votes

I think instant run might be creating issue .

Do one thing disable instant run in android studio and try again .I think it might will resolve issue .

0
votes

Try to update Android Studio. Turn off Instant Run from Settings → Build, Execution, Deployment → Instant Run and uncheck Enable Instant Run.