Bobert
Bobert

Reputation: 276

Gradle Plugin Update Recommended

I start the Android code sample "Room & Rx Java (Kotlin)"

if i start Android Studio

If i click "Update" i get this:

Unexpected Error

I click "OK" and after build i get this error

Gradel error

OK maby i use Gradel 4.6. If i search in gradle.properties there is no "org.gradle.configureondemand=false"

Can someone please tell me what goes wrong there?

Upvotes: 1

Views: 1219

Answers (2)

Vishal Sharma
Vishal Sharma

Reputation: 1061

Only change this inside build.gradle (Project) file:

classpath 'com.android.tools.build:gradle:3.1.4'

And change inside gradle-wrapper.properties(Gradle Version) file:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

Upvotes: 0

ʍѳђઽ૯ท
ʍѳђઽ૯ท

Reputation: 16976

Add:

org.gradle.configureondemand=false

In gradle.properties if it doesn't exist. Then, try to update again. It will override it for if it is exist or not.


P.s: There are Two gradle.properties files:

  1. In your project gradle.properties
  2. In ${HOME}/.gradle/gradle.properties

Try to add it inside the second one (Global one).

Check this out too: https://stackoverflow.com/a/49994951/4409113

Upvotes: 2

Related Questions