I have been working on a project for months without issues. Just today re-opened the project in Android Studio and started getting the error:
Gradle sync failed: Failed to notify project evaluation listener.
I already tried this and this, without success.
I also cleaned cache, rebuilt project, restarted my pc, uninstalled and reinstalled Android Support and Google libraries in SDK, and tried with Invalidate Cache and restart. None of these things worked.
And I'm using Android Studio 2.1.1, just in case.
I hope someone could help me fix this issue. Thanks in advance.
LOG:
Caused by: org.gradle.internal.event.ListenerNotificationException: Failed to notify project evaluation listener.
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:55)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:79)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy10.afterEvaluate(Unknown Source)
at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:67)
... 94 more
Caused by: java.lang.StackOverflowError
at com.google.common.base.Objects.hashCode(Objects.java:78)
at com.android.build.gradle.internal.dependency.LibraryDependencyImpl.hashCode(LibraryDependencyImpl.java:145)
at com.google.common.collect.AbstractMapBasedMultimap.put(AbstractMapBasedMultimap.java:192)
at com.google.common.collect.AbstractListMultimap.put(AbstractListMultimap.java:100)
at com.google.common.collect.ArrayListMultimap.put(ArrayListMultimap.java:66)
at com.android.build.gradle.internal.DependencyManager.addDependency(DependencyManager.java:807)
at com.android.build.gradle.internal.DependencyManager.addDependency(DependencyManager.java:855)
at com.android.build.gradle.internal.DependencyManager.addDependency(DependencyManager.java:855)
at com.android.build.gradle.internal.DependencyManager.addDependency(DependencyManager.java:855)
2016-05-29 15:34:00,668 [ 193987] WARN - nal.AbstractExternalSystemTask - Failed to notify project evaluation listener.
com.intellij.openapi.externalSystem.model.ExternalSystemException: Failed to notify project evaluation listener.
at org.jetbrains.plugins.gradle.service.project.AbstractProjectImportErrorHandler.createUserFriendlyError(AbstractProjectImportErrorHandler.java:106)
at org.jetbrains.plugins.gradle.service.project.BaseProjectImportErrorHandler.getUserFriendlyError(BaseProjectImportErrorHandler.java:158)
at org.jetbrains.plugins.gradle.service.project.BaseGradleProjectResolverExtension.getUserFriendlyError(BaseGradleProjectResolverExtension.java:457)
at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.getUserFriendlyError(AbstractProjectResolverExtension.java:158)
at com.android.tools.idea.gradle.project.AndroidGradleProjectResolver.getUserFriendlyError(AndroidGradleProjectResolver.java:350)
at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver$ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:373)
at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver$ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:339)
at org.jetbrains.plugins.gradle.service.project.GradleExecutionHelper.execute(GradleExecutionHelper.java:230)
at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:97)
at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:65)
at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl$1.produce(RemoteExternalSystemProjectResolverImpl.java:41)
at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl$1.produce(RemoteExternalSystemProjectResolverImpl.java:37)
at com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:59)
at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:37)
at com.intellij.openapi.externalSystem.service.remote.wrapper.ExternalSystemProjectResolverWrapper.resolveProjectInfo(ExternalSystemProjectResolverWrapper.java:49)
at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:51)
at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:138)
at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:124)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:419)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$4$2.run(ExternalSystemUtil.java:500)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:126)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:366)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55)
2016-05-29 15:34:00,683 [ 194002] WARN - radle.project.ProjectSetUpTask -
2016-05-29 15:34:00,683 [ 194002] INFO - radle.project.ProjectSetUpTask - Failed to notify project evaluation listener.
Consult IDE log for more details (Help | Show Log)
2016-05-29 15:34:00,683 [ 194002] INFO - ls.idea.gradle.GradleSyncState - Sync with Gradle for project 'IconShowcase' failed: Failed to notify project evaluation listener.
Consult IDE log for more details (Help | Show Log)
2016-05-29 15:34:00,902 [ 194221] INFO - #com.jetbrains.cidr.lang - Clearing symbols finished in 0 s.
2016-05-29 15:34:00,969 [ 194288] INFO - #com.jetbrains.cidr.lang - Loading symbols finished in 0 s.
2016-05-29 15:34:01,016 [ 194335] INFO - #com.jetbrains.cidr.lang - Building symbols finished in 0 s.
2016-05-29 15:34:01,016 [ 194335] INFO - #com.jetbrains.cidr.lang - Saving symbols finished in 0 s.
PROJECT STRUCTURE
app build.gradle
apply plugin: 'com.android.application'
repositories {
maven { url "https://jitpack.io" }
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
lintOptions {
abortOnError false
}
defaultConfig {
applicationId "jahirfiquitiva.apps.iconshowcase.sample"
minSdkVersion 16
targetSdkVersion 23
versionCode 10
versionName "1.0"
generatedDensities = []
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
sourceSets {
main {
res.srcDirs = [
'src/main/res',
'src/main/res/drawable',
'src/main/res/drawable/dashboard',
'src/main/res/drawable/designer',
'src/main/res/drawable/icon_pack',
'src/main/res/drawable/launchers_icons',
'src/main/res/drawable/widgets',
'src/main/res/values',
'src/main/res/values/icon_pack',
'src/main/res/values/configuration'
]
}
}
buildTypes {
release {
minifyEnabled false
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
themeMode {} //themeMode for testing
standard {} //standard testing without themeMode stuff
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.4.0'
compile project(':library')
}
library build.gradle
buildscript {
repositories {
mavenCentral()
}
}
apply plugin: 'com.android.library'
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
lintOptions {
abortOnError false
}
defaultConfig {
minSdkVersion 16
targetSdkVersion 23
versionCode 10
versionName "1.0"
generatedDensities = []
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
sourceSets {
main {
res.srcDirs = [
'src/main/res',
'src/main/res/drawable',
'src/main/res/drawable/dashboard',
'src/main/res/drawable/designer',
'src/main/res/drawable/icon_pack',
'src/main/res/drawable/launchers_icons',
'src/main/res/drawable/splash_screens',
'src/main/res/drawable/widgets',
'src/main/res/layout',
'src/main/res/layout/activities',
'src/main/res/layout/extras',
'src/main/res/layout/items',
'src/main/res/layout/sections',
'src/main/res/layout/widgets',
'src/main/res/values/icon_pack',
'src/main/res/values/configuration',
'src/main/res/values/texts'
]
}
}
buildTypes {
release {
minifyEnabled false
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
aaptOptions {
noCompress 'zip', 'komp', 'klwp', 'kwgt', 'klck', 'kwch'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.4.0@aar'
compile 'com.android.support:support-v4:23.4.0@aar'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0@aar'
compile 'com.android.support:recyclerview-v7:23.4.0@aar'
compile 'com.android.support:palette-v7:23.4.0@aar'
compile 'com.android.support:gridlayout-v7:23.4.0'
compile 'com.android.support:customtabs:23.4.0'
//Material Dialogs
compile('com.github.afollestad.material-dialogs:core:0.8.5.9@aar') {
transitive = true
}
//Material Drawer
compile('com.mikepenz:materialdrawer:5.2.7@aar') {
transitive = true
}
//OkHttp
compile 'com.squareup.okhttp3:okhttp:3.3.1'
//Glide Library - Image Loading Lib
compile 'com.github.bumptech.glide:glide:3.8.0-SNAPSHOT'
//Sectioned RecyclerView
compile('com.afollestad:sectioned-recyclerview:0.2.2') {
transitive = true
}
compile 'com.truizlop.sectionedrecyclerview:library:1.1.0'
//Muzei API
//noinspection GradleDynamicVersion
compile 'com.google.android.apps.muzei:muzei-api:2.+'
//Circular Image View
compile 'de.hdodenhof:circleimageview:2.0.0'
//RecyclerView Fast Scroller
compile 'com.github.pluscubed:recycler-fast-scroll:0.3.1@aar'
//Donations Lib
compile 'org.sufficientlysecure:donations:2.4'
//License Checker Lib
compile 'com.github.javiersantos:PiracyChecker:0.0.2'
//Required for better Zooper setup
compile 'io.reactivex:rxandroid:1.1.0'
//Required for Kustom support.
//noinspection GradleDynamicVersion
compile 'org.bitbucket.frankmonza:kustomapi:+'
}
settings.gradle
include ':app', ':library'
I had a similar problem when I moved to a higher level of gradle. Found the answer here. Try changing the gradle level In my case, this version helped
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
and this gradele version throws mistakes
'com.android.tools.build:gradle:2.2.2'
'com.android.tools.build:gradle:3.0.0'
Just do not forget to change distributionUrl in gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-milestone-1-all.zip
Fixed it by changing the MaterialDialogs lib version to
compile('com.afollestad.material-dialogs:core:0.8.5.9@aar') { transitive = true }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With