我已升级到Android Studio 3.1.1,现在我的项目未运行并出现此错误:
> org.gradle.api.tasks.TaskExecutionException: Execution failed for task
> ':app:compileDebugJavaWithJavac'. at
> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
> at
> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
> at
> org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
> at
> org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
> at
> org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
> at
> org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
> at
> org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
> at
> org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
> at
> org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
> at
> org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
> at
> org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
> at
> org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
> at
> org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
> at
> org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
> at
> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
> at
> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
> at
> org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
> at
> org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
> at
> org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
> at
> org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
> at
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
> at
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
> at
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
> at
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
> at
> org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
> at
> org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
> at
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
> at
> org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
> at
> org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at
> org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
> at java.lang.Thread.run(Thread.java:745) Caused by:
> org.gradle.api.internal.tasks.compile.CompilationFailedException:
> Compilation failed; see the compiler error output for details. at
> org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:50)
> at
> org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:35)
> at
> org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:98)
> at
> org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:51)
> at
> org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:37)
> at
> org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:35)
> at
> org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:25)
> at
> org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilationFinalizer.execute(IncrementalCompilationFinalizer.java:39)
> at
> org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilationFinalizer.execute(IncrementalCompilationFinalizer.java:24)
> at
> org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:207)
> at
> org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:133)
> at
> com.android.build.gradle.tasks.factory.AndroidJavaCompile.compile(AndroidJavaCompile.java:125)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498) at
> org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) at
> org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:46)
> at
> org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
> at
> org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
> at
> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
> at
> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
> at
> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
> at
> org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
> at
> org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
> at
> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
> at
> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
> ... 32 more
这是我的build.gradle:
configurations.all {
resolutionStrategy {
force "com.android.support:appcompat-v7:$project.andySDK"
force "com.android.support:support-vector-drawable:$project.andySDK"
force "com.android.support:support-v4:$project.andySDK"
force "com.android.support:animated-vector-drawable:$project.andySDK"
force "com.android.support:design:$project.andySDK"
force "com.android.support:recyclerview-v7:$project.andySDK"
force "com.android.support:cardview-v7:$project.andySDK"
force "com.android.support:support-v13:$project.andySDK"
force "net.sf.proguard:proguard-gradle:5.2.1"
}
}
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion project.myCompileSdkVersion.toInteger()
buildToolsVersion project.myBuildToolsVersion
defaultConfig {
multiDexEnabled true
applicationId "com.c2x.yad"
minSdkVersion project.myMinSdkVersion.toInteger()
targetSdkVersion project.myTargetSdkVersion.toInteger()
versionCode 3
versionName "80"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
project.ext.set("archivesBaseName", "NoteAsan_" + defaultConfig.versionName);
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/MANIFEST.MF'
}
lintOptions {
checkReleaseBuilds false
}
}
repositories {
mavenCentral()
maven { url "http://dl.bintray.com/hellmannmaicon/android" }
maven { url 'http://guardian.github.com/maven/repo-releases' }
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// RecyclerView
// compile 'com.rm:freedrawview:1.0.1'
// this is from main developer
// compile 'com.github.codekidX:storage-chooser:2b286fc'
// compile 'com.github.codekidX:storage-chooser:1.0.31'
compile('com.crashlytics.sdk.android:crashlytics:2.6.6@aar') {
transitive = true;
}
compile project(':colorpickerview')
// https://mvnrepository.com/artifact/commons-io/commons-io
// compile 'com.github.adrielcafe:AndroidAudioRecorder:0.2.0'
compile project(':AudioRecorder')
implementation ('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.11.0@aar'){
transitive=true
}
// compile 'com.github.adrielcafe:AndroidAudioConverter:0.0.8'
implementation "com.android.support:appcompat-v7:$project.andySDK"
implementation "com.android.support:design:$project.andySDK"
implementation "com.android.support:gridlayout-v7:$project.andySDK"
implementation "com.android.support:cardview-v7:$project.andySDK"
implementation "com.android.support:recyclerview-v7:$project.andySDK"
implementation "com.android.support:support-compat:$project.andySDK"
// implementation 'cn.pedant.sweetalert:library:1.3'
implementation 'com.github.f0ris.sweetalert:library:1.5.2'
implementation 'com.github.myinnos:AppFontChanger:1.0'
// implementation 'br.com.forusers.heinsinputdialogs:input-dialogs-library:0.1.4'
implementation 'com.github.matthiasrobbers:shortbread:1.0.0'
implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
implementation 'com.dropbox.core:dropbox-core-sdk:3.0.6'
implementation 'com.github.vlad1m1r990:Lemniscate:1.2.0'
implementation 'com.github.bumptech.glide:glide:4.6.1'
implementation 'commons-io:commons-io:2.5'
implementation 'com.evernote:android-job:1.2.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.github.matthiasrobbers:shortbread-compiler:1.0.0'
implementation 'com.alirezaafkar:sundatepicker:2.0.6'
implementation 'com.github.ganfra:material-spinner:1.1.1'
implementation 'com.github.hamsaadev:RTLMaterialSpinner:V1.0.1'
implementation 'com.wdullaer:materialdatetimepicker:3.5.0'
implementation 'joda-time:joda-time:2.9.9'
implementation 'com.aromajoin.library:actionsheet:0.0.2'
implementation 'com.android.support:multidex:1.0.3'
}