2017-10-04 8 views
3

AndroidプロジェクトでSonarqubeを設定する際に、次のエラーが発生します。 git bashモードでのみコマンドを実行しています。Sonarqubeを使用して解析を実装しようとしている間に、Gradleビルドが実行されていません

[email protected]= ~/Android_/staff-final (master) 
$ gradle sonarqube 

> Configure project :app 
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error. 


FAILURE: Build failed with an exception. 

* Where: 
Build file 'C:\Users\De\Android_\staff-final\app\build.gradle' line: 3 

* What went wrong: 
A problem occurred evaluating project ':app'. 
> org/gradle/listener/ActionBroadcast 

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

* Get more help at https://help.gradle.org 

BUILD FAILED in 1s 

私はSonarqubeに対して正しく環境変数を設定しました。

ライン3ポイントへ

apply plugin: 'org.sonarqube' 

パス変数がある
GRADLE_HOMEの\ビン
SONAR_RUNNER_HOME \ビン

GRADLE_HOME - > C:\のGradle-4.2-すべて\のGradle-4.2
SONAR_RUNNER_HOME - > C:\ sonar-runner-dist-2.4

build.gradleファイル

apply plugin: 'com.android.application' 
apply plugin: 'io.fabric' 
apply plugin: 'org.sonarqube' 



android { 
    compileSdkVersion 25 
    buildToolsVersion '25.0.0' 

    defaultConfig { 
     applicationId "com.xyz.staff" 
     minSdkVersion 15 
     targetSdkVersion 25 
     versionCode 54 
     versionName "3.0.5" 
     multiDexEnabled = true 
    } 
    .... 
    . 
    . 
    . 
    .... 
sonarqube { 
    properties { 
     property "sonar.projectName", "Staff" 
     property "sonar.projectKey", "Staff" 
     property "sonar.sources", "src/main/java" 
     property "sonar.language", "java" 
     property "sonar.sourceEncoding", "UTF-8" 
    } 
} 

スタックトレースを

$ gradle sonarqube --stacktrace 
Starting a Gradle Daemon (subsequent builds will be faster) 

> Configure project :app 
Project evaluation failed including an error in afterEvaluate {}. 
java.lang.IllegalStateException: buildToolsVersion is not specified. 
     at com.google.common.base.Preconditions.checkState(Preconditions.java:173) 
     at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:558) 
     at com.android.build.gradle.BasePlugin.lambda$null$4(BasePlugin.java:526) 
     at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81) 
     at com.android.build.gradle.BasePlugin.lambda$createTasks$5(BasePlugin.java:522) 
     at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:91) 
     at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:80) 
     at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42) 
     at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230) 
     at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149) 
     at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58) 
     at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324) 
     at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:234) 
     at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140) 
     at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37) 
     at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) 
     at com.sun.proxy.$Proxy24.afterEvaluate(Unknown Source) 
     at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:76) 
     at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.java:70) 
     at org.gradle.configuration.project.LifecycleProjectEvaluator.access$100(LifecycleProjectEvaluator.java:34) 
     at org.gradle.configuration.project.LifecycleProjectEvaluator$ConfigureProject.run(LifecycleProjectEvaluator.java:110) 
     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.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:50) 
     at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:656) 
     at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:135) 
     at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35) 
     at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:62) 
     at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:38) 
     at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuild.run(DefaultGradleLauncher.java:249) 
     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.initialization.DefaultGradleLauncher.configureBuild(DefaultGradleLauncher.java:167) 
     at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:126) 
     at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:109) 
     at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:78) 
     at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:75) 
     at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152) 
     at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:100) 
     at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:75) 
     at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28) 
     at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) 
     at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32) 
     at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$1.run(RunAsBuildOperationBuildActionRunner.java:43) 
     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.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:40) 
     at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51) 
     at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:47) 
     at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30) 
     at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39) 
     at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25) 
     at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:80) 
     at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:53) 
     at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:57) 
     at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:32) 
     at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36) 
     at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25) 
     at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43) 
     at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29) 
     at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:64) 
     at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:29) 
     at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:59) 
     at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:44) 
     at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:45) 
     at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30) 
     at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67) 
     at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74) 
     at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72) 
     at org.gradle.util.Swapper.swap(Swapper.java:38) 
     at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62) 
     at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82) 
     at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50) 
     at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295) 
     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) 


FAILURE: Build failed with an exception. 

* Where: 
Build file 'C:\Users\De\Android_\staff-final\app\build.gradle' line: 3 

* What went wrong: 
A problem occurred evaluating project ':app'. 
> org/gradle/listener/ActionBroadcast 

* Try: 
Run with --info or --debug option to get more log output. 

* Exception is: 
org.gradle.api.GradleScriptException: A problem occurred evaluating project ':app'. 
     at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:92) 
     at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$2.run(DefaultScriptPluginFactory.java:202) 
     at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:77) 
     at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:207) 
     at org.gradle.configuration.BuildOperationScriptPlugin$1.run(BuildOperationScriptPlugin.java:61) 
     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.configuration.BuildOperationScriptPlugin.apply(BuildOperationScriptPlugin.java:58) 
     at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:41) 
     at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26) 
     at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34) 
     at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.java:64) 
     at org.gradle.configuration.project.LifecycleProjectEvaluator.access$100(LifecycleProjectEvaluator.java:34) 
     at org.gradle.configuration.project.LifecycleProjectEvaluator$ConfigureProject.run(LifecycleProjectEvaluator.java:110) 
     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.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:50) 
     at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:656) 
     at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:135) 
     at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35) 
     at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:62) 
     at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:38) 
     at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuild.run(DefaultGradleLauncher.java:249) 
     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.initialization.DefaultGradleLauncher.configureBuild(DefaultGradleLauncher.java:167) 
     at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:126) 
     at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:109) 
     at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:78) 
     at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:75) 
     at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152) 
     at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:100) 
     at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:75) 
     at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28) 
     at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) 
     at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32) 
     at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$1.run(RunAsBuildOperationBuildActionRunner.java:43) 
     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.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:40) 
     at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51) 
     at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:47) 
     at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30) 
     at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39) 
     at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25) 
     at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:80) 
     at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:53) 
     at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:57) 
     at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:32) 
     at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36) 
     at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25) 
     at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43) 
     at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29) 
     at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:64) 
     at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:29) 
     at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:59) 
     at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:44) 
     at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:45) 
     at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30) 
     at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67) 
     at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74) 
     at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72) 
     at org.gradle.util.Swapper.swap(Swapper.java:38) 
     at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62) 
     at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82) 
     at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) 
     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) 
     at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50) 
     at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295) 
     at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) 
     at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) 
     at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) 
Caused by: java.lang.NoClassDefFoundError: org/gradle/listener/ActionBroadcast 
     at org.sonarqube.gradle.SonarQubePlugin.addBroadcaster(SonarQubePlugin.java:95) 
     at org.sonarqube.gradle.SonarQubePlugin.apply(SonarQubePlugin.java:86) 
     at org.sonarqube.gradle.SonarQubePlugin.apply(SonarQubePlugin.java:63) 
     at org.gradle.api.internal.plugins.ImperativeOnlyPluginTarget.applyImperative(ImperativeOnlyPluginTarget.java:42) 
     at org.gradle.api.internal.plugins.RuleBasedPluginTarget.applyImperative(RuleBasedPluginTarget.java:50) 
     at org.gradle.api.internal.plugins.DefaultPluginManager.addPlugin(DefaultPluginManager.java:165) 
     at org.gradle.api.internal.plugins.DefaultPluginManager.access$200(DefaultPluginManager.java:47) 
     at org.gradle.api.internal.plugins.DefaultPluginManager$AddPluginBuildOperation.run(DefaultPluginManager.java:252) 
     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.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:144) 
     at org.gradle.api.internal.plugins.DefaultPluginManager.apply(DefaultPluginManager.java:125) 
     at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyType(DefaultObjectConfigurationAction.java:120) 
     at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:38) 
     at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:86) 
     at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:143) 
     at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.java:46) 
     at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.java:34) 
     at org.gradle.api.Script$apply$0.callCurrent(Unknown Source) 
     at build_e32o31vwm7mr60dmphulxq4oz.run(C:\Users\De\Android_\staff-final\app\build.gradle:3) 
     at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:90) 
     ... 93 more 
Caused by: java.lang.ClassNotFoundException: org.gradle.listener.ActionBroadcast 
     ... 116 more 


* Get more help at https://help.gradle.org 

BUILD FAILED in 42s 

これは、Windowsマシン上で以下の通りです。多くin the docs指定されているように

答えて

0

...解決のために待っている、あなたはSonarQubeのためではないapply pluginを行うが、その代わりに

plugins { 
    id "org.sonarqube" version "2.5" 
} 
+0

次のリンクを参照して同じことを試みました。 https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Gradle 同期中にGradleビルドに失敗しています。 – deva11

+0

エラー:(40、0)起動に失敗しました: ビルドファイル 'C:\ Users \ De \ Android_ \ staff-final \ app \ build.gradle':40:buildscript {}と他のプラグイン{}スクリプトブロックのみが許可されますplugins {}ブロックの前に他のステートメントは許可されていません プラグイン{}ブロックの情報についてはhttps://docs.gradle.org/3.3/userguide/plugins.html#sec:plugins_blockをご覧ください @ line 40、column 1. プラグイン{ ^ 1エラー Open File deva11

+0

あなたのGradleのビルドファイルのコードスニペットを追加してください、あなたはソナープラグインを適用する方法について説明します。また、 - stacktraceコマンドを実行すると、問題の診断にも役立ちます – originx

4

アプリのbuild.gradleの上に以下のコードを追加

plugins { 
    id "org.sonarqube" version "2.5" 
} 

プロジェクトのGradleファイルから以下の依存関係

classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.5' 
を削除しました

と私の問題を解決しましたgradle.propertiesファイル から

systemProp.sonar.login=token 

をコメントしました。

以下のリンクはそれを解決するのに役立ちました。

https://androidlearnersite.wordpress.com/2017/02/21/integrating-and-understanding-sonarqube-in-android/

関連する問題