Android Studio-无法通知项目评估侦听器错误 [英] Android Studio - Failed to notify project evaluation listener error
问题描述
以下是Android Studio中的build.gradle代码
Following is the build.gradle code in Android Studio
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.sg.blahblah"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
lintOptions {
checkReleaseBuilds true
abortOnError false
xmlReport true
htmlReport true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
lintOptions {
disable 'MissingTranslation'
}
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.google.android.apps.dashclock:dashclock-api:+'
compile 'com.roughike:bottom-bar:1.4.0.1'
compile 'com.diogobernardino:williamchart:2.2'
}
我收到以下错误: 错误:配置项目':app'时出现问题.
I am getting the below error: Error:A problem occurred configuring project ':app'.
无法通知项目评估侦听器. com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V
Failed to notify project evaluation listener. com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V
任何人都可以帮忙吗?
以下是即时运行"屏幕截图
Following is the Instant Run screenshot
推荐答案
我也遇到了这个问题.我通过更改项目中的build.gradle
来解决它
I got this problem too. I fix it by Change build.gradle
in project
更改
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
我也更改了gradle-wrapper.properties(全局版本)中的distributionUrl
And also I change the distributionUrl
in gradle-wrapper.properties(Global Version)
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-milestone-1-all.zip
成功了.仅供参考.
这篇关于Android Studio-无法通知项目评估侦听器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!