Kotlin-dsl-samples: Android sample fails to run: Failed to notify project evaluation listener.

Created on 19 Apr 2017  路  10Comments  路  Source: gradle/kotlin-dsl-samples

Error:A problem occurred configuring root project 'hello-android'.

Failed to notify project evaluation listener.
com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V

Maybe I'm not configured right? I'm on Android Studio 2.3 (Feb. 24 release) and Kotlin 1.1.1-release-Studio2.3-1.

Also, I can get it to work by changing to v3.5 of gradle-script-kotlin.
I.e. in gradle-wrapper.properties changing this:
distributionUrl=https://repo.gradle.org/gradle/dist-snapshots/gradle-script-kotlin-4.0-20170418125848+0000-all.zip
to this:
distributionUrl=https://repo.gradle.org/gradle/dist-snapshots/gradle-script-kotlin-3.5-20170404014535+0000-all.zip

Most helpful comment

I've got the same problem, i just went back on the stable version and changed the classpath 'com.android.tools.build:gradle' from 3.0.0 to 2.3.2

All 10 comments

Hit the same problem trying to compile Flutter on Linux. Project compiles fine on Mac.

same failure when trying to compile flutter on Windows 10.
help?

also adding --stacktrace to settings/build/gradle-android compiler doesn't change console output

I've found somewhere discussion that this might be related to case sensitive and non-case sensitive file systems. Ext3(linux) and NTFS(windows) are case sensitive. HFS+ (mac) is not.

Ok so this looks like a different issue. Mine is affecting only Grade 4.0 and Android Studio 3.0.

I've got the same problem, i just went back on the stable version and changed the classpath 'com.android.tools.build:gradle' from 3.0.0 to 2.3.2

This looks like an issue with the Android Gradle plugin. Would you mind opening an issue on Android's issue tracker if that error is still reproducible with the latest version of Android Studio and Gradle?

@aurelienbouteiller's recommendation worked fine for me, Thank you!

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':CordovaLib'.

    Failed to notify project evaluation listener.
    Could not initialize class com.android.sdklib.repository.AndroidSdkHandler

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

gradle sync
Error:Failed to notify project evaluation listener.

gradle build
Error:FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':app'.

    Failed to notify project evaluation listener.
    java.lang.reflect.InvocationTargetException (no error message)

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s

gradle sync
Error:Failed to notify project evaluation listener.

gradle build
Error:FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':app'.

Failed to notify project evaluation listener.
java.lang.reflect.InvocationTargetException (no error message)

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  • Get more help at https://help.gradle.org

BUILD FAILED in 1

Hi even I am getting the same issue now, did you get any solution for this.

Was this page helpful?
0 / 5 - 0 ratings