我试图从 2016 年恢复一个非常非常古老的项目。在升级了 gradle 插件、gradlew-wrapper、数据绑定导入以及项目更新中引用的许多其他问题后,我能够运行该应用程序。但是当我尝试运行该应用程序时,我的构建因错误而中断:
java.lang.NullPointerException (no error message)
如果我使用 --stacktrace 选项运行相同的构建,我会得到这个:
java.lang.NullPointerException
at org.gradle.internal.exceptions.DefaultMultiCauseException.printSingleCauseStackTrace(DefaultMultiCauseException.java:143)
at org.gradle.internal.exceptions.DefaultMultiCauseException.printStackTrace(DefaultMultiCauseException.java:131)
at org.gradle.internal.build.event.types.DefaultFailure.fromThrowable(DefaultFailure.java:56)
at org.gradle.internal.build.event.types.DefaultFailure.fromThrowable(DefaultFailure.java:58)
at org.gradle.internal.build.event.types.DefaultFailure.fromThrowable(DefaultFailure.java:58)
at org.gradle.tooling.internal.provider.runner.ClientForwardingTaskOperationListener.toTaskResult(ClientForwardingTaskOperationListener.java:125)
at org.gradle.tooling.internal.provider.runner.ClientForwardingTaskOperationListener.toFinishedEvent(ClientForwardingTaskOperationListener.java:91)
at org.gradle.tooling.internal.provider.runner.ClientForwardingTaskOperationListener.toFinishedEvent(ClientForwardingTaskOperationListener.java:59)
at org.gradle.tooling.internal.provider.runner.SubtreeFilteringBuildOperationListener.finished(SubtreeFilteringBuildOperationListener.java:96)
at org.gradle.tooling.internal.provider.runner.SubtreeFilteringBuildOperationListener.finished(SubtreeFilteringBuildOperationListener.java:98)
at org.gradle.tooling.internal.provider.runner.ClientForwardingProjectConfigurationOperationListener.finished(ClientForwardingProjectConfigurationOperationListener.java:73)
at org.gradle.internal.operations.DefaultBuildOperationListenerManager$ProgressShieldingBuildOperationListener.finished(DefaultBuildOperationListenerManager.java:127)
at org.gradle.internal.operations.DefaultBuildOperationListenerManager$1.finished(DefaultBuildOperationListenerManager.java:60)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$ListenerAdapter.stop(DefaultBuildOperationExecutor.java:170)
at org.gradle.internal.operations.DefaultBuildOperationRunner$BuildOperationTrackingListener.stop(DefaultBuildOperationRunner.java:229)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:82)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:372)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:359)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:352)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:338)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
但是问题还是没有搞清楚。
我已经试过了:
.gradle
目录.idea
.gradle/caches
的整个安卓所有这些选项都没有帮助我