1

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?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Bobert
  • 226
  • 4
  • 16

2 Answers2

2

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

ʍѳђઽ૯ท
  • 16,646
  • 7
  • 53
  • 108
0

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
ʍѳђઽ૯ท
  • 16,646
  • 7
  • 53
  • 108
Vishal Sharma
  • 1,051
  • 2
  • 8
  • 15