Android studio 3.1.x执行命令“./gradlew lintRelease”时出错

时间:2018-05-04 06:02:51

标签: android lint

[Fatal Error] :1:26: The version is required in the XML declaration.
[Fatal Error] :1:26: The version is required in the XML declaration.

Unexpected failure during lint analysis of null (this is a bug in lint or one of the libraries it depends on)

`IllegalArgumentException:Context.<init>(Context.kt:-1)←DefaultConfiguration.formatError(DefaultConfiguration.java:307)←DefaultConfiguration.readConfig(DefaultConfiguration.java:408)←DefaultConfiguration.ensureInitialized(DefaultConfiguration.java:292)←Defaonfiguration.getSeverity(DefaultConfiguration.java:272)←LintCliClient$CliConfiguration.computeSeverity(LintCliClient.java:603)←LintCliClient$CliConfiguration.getSeverity(LintCliClient.java:570)←DefaultConfiguration.getSeverity(DefaultConfiguration.java:284)`

You can set environment variable `LINT_PRINT_STACKTRACE=true` to dump a full stacktrace to stdout.
java.lang.IllegalArgumentException: Parameter specified as non-null is null: method com.android.tools.lint.detector.api.Context.<init>, parameter project
        at com.android.tools.lint.detector.api.Context.<init>(Context.kt)
        at com.android.tools.lint.client.api.DefaultConfiguration.formatError(DefaultConfiguration.java:307)
        at com.android.tools.lint.client.api.DefaultConfiguration.readConfig(DefaultConfiguration.java:408)
        at com.android.tools.lint.client.api.DefaultConfiguration.ensureInitialized(DefaultConfiguration.java:292)
        at com.android.tools.lint.client.api.DefaultConfiguration.getSeverity(DefaultConfiguration.java:272)
        at com.android.tools.lint.LintCliClient$CliConfiguration.computeSeverity(LintCliClient.java:603)
        at com.android.tools.lint.LintCliClient$CliConfiguration.getSeverity(LintCliClient.java:570)
        at com.android.tools.lint.client.api.DefaultConfiguration.getSeverity(DefaultConfiguration.java:284)
        at com.android.tools.lint.LintCliClient$CliConfiguration.computeSeverity(LintCliClient.java:603)
        at com.android.tools.lint.LintCliClient$CliConfiguration.getSeverity(LintCliClient.java:570)
        at com.android.tools.lint.client.api.DefaultConfiguration.formatError(DefaultConfiguration.java:309)
        at com.android.tools.lint.client.api.DefaultConfiguration.readConfig(DefaultConfiguration.java:408)
        at com.android.tools.lint.client.api.DefaultConfiguration.ensureInitialized(DefaultConfiguration.java:292)
        at com.android.tools.lint.client.api.DefaultConfiguration.getSeverity(DefaultConfiguration.java:272)
        at com.android.tools.lint.LintCliClient$CliConfiguration.computeSeverity(LintCliClient.java:603)
        at com.android.tools.lint.LintCliClient$CliConfiguration.getSeverity(LintCliClient.java:570)
        at com.android.tools.lint.client.api.Configuration.isEnabled(Configuration.java:65)
        at com.android.tools.lint.client.api.IssueRegistry.createDetectors(IssueRegistry.java:246)
        at com.android.tools.lint.client.api.LintDriver.computeDetectors(LintDriver.kt:597)
        at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.kt:378)
        at com.android.tools.lint.LintCliClient.run(LintCliClient.java:155)
        at com.android.build.gradle.internal.LintGradleClient.run(LintGradleClient.java:197)
        at com.android.build.gradle.tasks.LintBaseTask.runLint(LintBaseTask.java:198)
        at com.android.build.gradle.tasks.LintPerVariantTask.lintSingleVariant(LintPerVariantTask.java:53)
        at com.android.build.gradle.tasks.LintPerVariantTask.lint(LintPerVariantTask.java:45)
        at sun.reflect.GeneratedMethodAccessor373.invoke(Unknown Source)
        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.DefaultTaskClassInfoStore$StandardTaskAction.doExecute(DefaultTaskClassInfoStore.java:141)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:731)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:705)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
        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:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
        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:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        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:124)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
        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:748)
java.lang.IllegalArgumentException: Parameter specified as non-null is null: method com.android.tools.lint.detector.api.Context.<init>, parameter project
        at com.android.tools.lint.detector.api.Context.<init>(Context.kt)
        at com.android.tools.lint.client.api.DefaultConfiguration.formatError(DefaultConfiguration.java:307)
        at com.android.tools.lint.client.api.DefaultConfiguration.readConfig(DefaultConfiguration.java:408)
        at com.android.tools.lint.client.api.DefaultConfiguration.ensureInitialized(DefaultConfiguration.java:292)
        at com.android.tools.lint.client.api.DefaultConfiguration.getSeverity(DefaultConfiguration.java:272)
        at com.android.tools.lint.LintCliClient$CliConfiguration.computeSeverity(LintCliClient.java:603)
        at com.android.tools.lint.LintCliClient$CliConfiguration.getSeverity(LintCliClient.java:570)
        at com.android.tools.lint.client.api.DefaultConfiguration.getSeverity(DefaultConfiguration.java:284)
        at com.android.tools.lint.LintCliClient$CliConfiguration.computeSeverity(LintCliClient.java:603)
        at com.android.tools.lint.LintCliClient$CliConfiguration.getSeverity(LintCliClient.java:570)
        at com.android.tools.lint.client.api.DefaultConfiguration.formatError(DefaultConfiguration.java:309)
        at com.android.tools.lint.client.api.DefaultConfiguration.readConfig(DefaultConfiguration.java:408)
        at com.android.tools.lint.client.api.DefaultConfiguration.ensureInitialized(DefaultConfiguration.java:292)
        at com.android.tools.lint.client.api.DefaultConfiguration.getSeverity(DefaultConfiguration.java:272)
        at com.android.tools.lint.LintCliClient$CliConfiguration.computeSeverity(LintCliClient.java:603)
        at com.android.tools.lint.LintCliClient$CliConfiguration.getSeverity(LintCliClient.java:570)
        at com.android.tools.lint.client.api.Configuration.isEnabled(Configuration.java:65)
        at com.android.tools.lint.client.api.IssueRegistry.createDetectors(IssueRegistry.java:246)
        at com.android.tools.lint.client.api.LintDriver.computeDetectors(LintDriver.kt:597)
        at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.kt:378)
        at com.android.tools.lint.LintCliClient.run(LintCliClient.java:155)
        at com.android.build.gradle.internal.LintGradleClient.run(LintGradleClient.java:197)
        at com.android.build.gradle.tasks.LintBaseTask.runLint(LintBaseTask.java:198)
        at com.android.build.gradle.tasks.LintPerVariantTask.lintSingleVariant(LintPerVariantTask.java:53)
        at com.android.build.gradle.tasks.LintPerVariantTask.lint(LintPerVariantTask.java:45)
        at sun.reflect.GeneratedMethodAccessor373.invoke(Unknown Source)
        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.DefaultTaskClassInfoStore$StandardTaskAction.doExecute(DefaultTaskClassInfoStore.java:141)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:731)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:705)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
        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:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
        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:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        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:124)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
        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:748)
Lint found no errors or warnings

0 个答案:

没有答案