New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

':base:compileReleaseJavaWithJavac'.> java.lang.NullPointerException (no error message) #684

Closed
bigsaobi opened this Issue Feb 28, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@bigsaobi

bigsaobi commented Feb 28, 2017

全量编译时出现以上错误,无日志,无错误信息,工程submoudle比较多,一共13个子工程

BUILD FAILED

Total time: 5.294 secs

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':base:compileReleaseJavaWithJavac'.

java.lang.NullPointerException (no error message)

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

[ERROR] --------------------------------------------------------
[ERROR] build failed with script: ./gradlew :app:assembleDebug -P freelineBuild=true
[ERROR] --------------------------------------------------------
[DEBUG] Prepare tasks time: 0.6s
[DEBUG] Task engine running time: 11.5s
[DEBUG] Total time: 12.0s
[DEBUG] --------------------------------------------------------

@bigsaobi

This comment has been minimized.

Show comment
Hide comment
@bigsaobi

bigsaobi Feb 28, 2017

15:17:10.810 [ERROR] [org.gradle.BuildExceptionReporter]
15:17:10.810 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
15:17:10.810 [ERROR] [org.gradle.BuildExceptionReporter]
15:17:10.810 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
15:17:10.810 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':base:compileReleaseJavaWithJavac'.
15:17:10.810 [ERROR] [org.gradle.BuildExceptionReporter] > java.lang.NullPointerException (no error message)
15:17:10.810 [ERROR] [org.gradle.BuildExceptionReporter]
15:17:10.810 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
15:17:10.811 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':base:compileReleaseJavaWithJavac'.
15:17:10.811 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
15:17:10.811 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
15:17:10.811 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
15:17:10.811 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
15:17:10.811 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
15:17:10.811 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.NullPointerException
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.jar.JarSnapshot.getHashes(JarSnapshot.java:82)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.jar.JarSnapshot.affectedSince(JarSnapshot.java:54)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.jar.JarSnapshot.getAffectedClassesSince(JarSnapshot.java:47)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.jar.JarChangeDependentsFinder.getActualDependents(JarChangeDependentsFinder.java:65)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.jar.JarChangeProcessor.processChange(JarChangeProcessor.java:39)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.RecompilationSpecProvider$InputChangeAction.execute(RecompilationSpecProvider.java:81)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.RecompilationSpecProvider$InputChangeAction.execute(RecompilationSpecProvider.java:58)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.changes.ChangesOnlyIncrementalTaskInputs.doOutOfDate(ChangesOnlyIncrementalTaskInputs.java:48)
15:17:10.813 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.changes.StatefulIncrementalTaskInputs.outOfDate(StatefulIncrementalTaskInputs.java:46)
15:17:10.813 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.changes.ChangesOnlyIncrementalTaskInputs.outOfDate(ChangesOnlyIncrementalTaskInputs.java:28)
15:17:10.813 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.RecompilationSpecProvider.provideRecompilationSpec(RecompilationSpecProvider.java:49)
15:17:10.813 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.SelectiveCompiler.execute(SelectiveCompiler.java:54)
15:17:10.813 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.SelectiveCompiler.execute(SelectiveCompiler.java:31)
15:17:10.813 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilationFinalizer.execute(IncrementalCompilationFinalizer.java:39)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilationFinalizer.execute(IncrementalCompilationFinalizer.java:24)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:163)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:127)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.tasks.factory.AndroidJavaCompile.compile(AndroidJavaCompile.java:49)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:245)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:232)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] ... 14 more
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter]
15:17:10.815 [LIFECYCLE] [org.gradle.BuildResultLogger]
15:17:10.815 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
15:17:10.815 [LIFECYCLE] [org.gradle.BuildResultLogger]
15:17:10.815 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 9.115 secs

./gradlew :app:assembleDebug -P freelineBuild=true --info --debug --stacktrace
使用以上命令运行得到这个错误

bigsaobi commented Feb 28, 2017

15:17:10.810 [ERROR] [org.gradle.BuildExceptionReporter]
15:17:10.810 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
15:17:10.810 [ERROR] [org.gradle.BuildExceptionReporter]
15:17:10.810 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
15:17:10.810 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':base:compileReleaseJavaWithJavac'.
15:17:10.810 [ERROR] [org.gradle.BuildExceptionReporter] > java.lang.NullPointerException (no error message)
15:17:10.810 [ERROR] [org.gradle.BuildExceptionReporter]
15:17:10.810 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
15:17:10.811 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':base:compileReleaseJavaWithJavac'.
15:17:10.811 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
15:17:10.811 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
15:17:10.811 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
15:17:10.811 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
15:17:10.811 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
15:17:10.811 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.NullPointerException
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.jar.JarSnapshot.getHashes(JarSnapshot.java:82)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.jar.JarSnapshot.affectedSince(JarSnapshot.java:54)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.jar.JarSnapshot.getAffectedClassesSince(JarSnapshot.java:47)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.jar.JarChangeDependentsFinder.getActualDependents(JarChangeDependentsFinder.java:65)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.jar.JarChangeProcessor.processChange(JarChangeProcessor.java:39)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.RecompilationSpecProvider$InputChangeAction.execute(RecompilationSpecProvider.java:81)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.RecompilationSpecProvider$InputChangeAction.execute(RecompilationSpecProvider.java:58)
15:17:10.812 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.changes.ChangesOnlyIncrementalTaskInputs.doOutOfDate(ChangesOnlyIncrementalTaskInputs.java:48)
15:17:10.813 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.changes.StatefulIncrementalTaskInputs.outOfDate(StatefulIncrementalTaskInputs.java:46)
15:17:10.813 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.changedetection.changes.ChangesOnlyIncrementalTaskInputs.outOfDate(ChangesOnlyIncrementalTaskInputs.java:28)
15:17:10.813 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.RecompilationSpecProvider.provideRecompilationSpec(RecompilationSpecProvider.java:49)
15:17:10.813 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.SelectiveCompiler.execute(SelectiveCompiler.java:54)
15:17:10.813 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.SelectiveCompiler.execute(SelectiveCompiler.java:31)
15:17:10.813 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilationFinalizer.execute(IncrementalCompilationFinalizer.java:39)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilationFinalizer.execute(IncrementalCompilationFinalizer.java:24)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:163)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:127)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at com.android.build.gradle.tasks.factory.AndroidJavaCompile.compile(AndroidJavaCompile.java:49)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:245)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:232)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter] ... 14 more
15:17:10.814 [ERROR] [org.gradle.BuildExceptionReporter]
15:17:10.815 [LIFECYCLE] [org.gradle.BuildResultLogger]
15:17:10.815 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
15:17:10.815 [LIFECYCLE] [org.gradle.BuildResultLogger]
15:17:10.815 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 9.115 secs

./gradlew :app:assembleDebug -P freelineBuild=true --info --debug --stacktrace
使用以上命令运行得到这个错误

@bigsaobi

This comment has been minimized.

Show comment
Hide comment
@bigsaobi

bigsaobi Feb 28, 2017

然后运行studio插件进行自动安装的时候,本来需要配置到主工程build.gradle中的dependencies {
classpath 'com.antfortune.freeline:gradle:x.x.x'
}会异常的配置到子工程的build.gradle中

bigsaobi commented Feb 28, 2017

然后运行studio插件进行自动安装的时候,本来需要配置到主工程build.gradle中的dependencies {
classpath 'com.antfortune.freeline:gradle:x.x.x'
}会异常的配置到子工程的build.gradle中

@lomanyong

This comment has been minimized.

Show comment
Hide comment
@lomanyong

lomanyong Mar 1, 2017

Member

@bigsaobi 这个问题已经貌似有人遇见,不过不是freeline导致的,是gradle的bug应该,具体可以搜索一下相关的issue。很早期的时候有人遇见了...

Member

lomanyong commented Mar 1, 2017

@bigsaobi 这个问题已经貌似有人遇见,不过不是freeline导致的,是gradle的bug应该,具体可以搜索一下相关的issue。很早期的时候有人遇见了...

@lomanyong lomanyong closed this Mar 1, 2017

@bigsaobi

This comment has been minimized.

Show comment
Hide comment
@bigsaobi

bigsaobi Mar 1, 2017

@lomanyong 单独用gradle,不用freeline编译没有任何问题啊

bigsaobi commented Mar 1, 2017

@lomanyong 单独用gradle,不用freeline编译没有任何问题啊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment