我刚刚开始使用 Rx-Android 和 Retro Lambda。我正在创建一个 hello world 项目。我按照说明进行操作,但项目无法编译。
我有一个错误
错误:任务“:mobile:compileDebugJavaWithJavac”执行失败。
启动进程 'command 'C:\Program Files\Javajdk1.8.0_65/bin/javac'' 出现问题
我正在运行具有以下配置
Android Studio 的 windows 10 机器:2.0 Beta 6
Gradle 版本:2.10
Android 插件版本:2.0.0-beta6
Gradle 脚本
-----------------顶级Build.gradle--------------
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-beta6'
classpath 'me.tatarka:gradle-retrolambda:3.3.0-beta4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenCentral()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
------------------------- 模块 Build.Gradle --------- -
apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.findit.hellorxjava"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
wearApp project(':wear')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'io.reactivex:rxjava:1.1.0'
compile 'io.reactivex:rxandroid:1.1.0'
compile 'com.jakewharton.rxbinding:rxbinding:0.3.0'
}
调试时的堆栈跟踪
14:13:04.515 [ERROR] [org.gradle.BuildExceptionReporter]
14:13:04.515 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
14:13:04.515 [ERROR] [org.gradle.BuildExceptionReporter]
14:13:04.516 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
14:13:04.516 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':mobile:compileDebugJavaWithJavac'.
14:13:04.516 [ERROR] [org.gradle.BuildExceptionReporter] > A problem occurred starting process 'command 'C:\Program Files\Javajdk1.8.0_65\/bin/javac''
14:13:04.516 [ERROR] [org.gradle.BuildExceptionReporter]
14:13:04.516 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
14:13:04.516 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':mobile:compileDebugJavaWithJavac'.
14:13:04.517 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
14:13:04.517 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
14:13:04.517 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
14:13:04.517 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
14:13:04.517 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
14:13:04.517 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
14:13:04.517 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
14:13:04.517 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
14:13:04.518 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
14:13:04.518 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
14:13:04.518 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
14:13:04.518 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
14:13:04.518 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
14:13:04.518 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
14:13:04.519 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
14:13:04.519 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
14:13:04.519 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
14:13:04.519 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
14:13:04.519 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
14:13:04.519 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
14:13:04.520 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
14:13:04.520 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
14:13:04.520 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:154)
14:13:04.520 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22)
14:13:04.520 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
14:13:04.520 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
14:13:04.521 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151)
14:13:04.521 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
14:13:04.521 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
14:13:04.521 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
14:13:04.521 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
14:13:04.521 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
14:13:04.521 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
14:13:04.521 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
14:13:04.521 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
14:13:04.521 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:46)
14:13:04.522 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
14:13:04.522 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.tooling.internal.provider.runner.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:58)
14:13:04.522 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
14:13:04.522 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
14:13:04.522 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
14:13:04.523 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:78)
14:13:04.523 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:48)
14:13:04.523 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)
14:13:04.523 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
14:13:04.523 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
14:13:04.523 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
14:13:04.523 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
14:13:04.524 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
14:13:04.524 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
14:13:04.524 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
14:13:04.524 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
14:13:04.524 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
14:13:04.524 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
14:13:04.524 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.util.Swapper.swap(Swapper.java:38)
14:13:04.524 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
14:13:04.525 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
14:13:04.525 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)
14:13:04.525 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
14:13:04.525 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:66)
14:13:04.525 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
14:13:04.525 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
14:13:04.525 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
14:13:04.525 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
14:13:04.525 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
14:13:04.526 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
14:13:04.526 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
14:13:04.526 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
14:13:04.526 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246)
14:13:04.526 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
14:13:04.526 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
14:13:04.526 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'C:\Program Files\Javajdk1.8.0_65\/bin/javac''
14:13:04.527 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.process.internal.DefaultExecHandle.setEndStateInfo(DefaultExecHandle.java:197)
14:13:04.527 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.process.internal.DefaultExecHandle.failed(DefaultExecHandle.java:327)
14:13:04.527 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:86)
14:13:04.527 [ERROR] [org.gradle.BuildExceptionReporter] ... 2 more
14:13:04.527 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: net.rubygrapefruit.platform.NativeException: Could not start 'C:\Program Files\Javajdk1.8.0_65\/bin/javac'
14:13:04.527 [ERROR] [org.gradle.BuildExceptionReporter] at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:27)
14:13:04.527 [ERROR] [org.gradle.BuildExceptionReporter] at net.rubygrapefruit.platform.internal.WindowsProcessLauncher.start(WindowsProcessLauncher.java:22)
14:13:04.527 [ERROR] [org.gradle.BuildExceptionReporter] at net.rubygrapefruit.platform.internal.WrapperProcessLauncher.start(WrapperProcessLauncher.java:36)
14:13:04.528 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:68)
14:13:04.528 [ERROR] [org.gradle.BuildExceptionReporter] ... 2 more
14:13:04.528 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.io.IOException: Cannot run program "C:\Program Files\Javajdk1.8.0_65\/bin/javac" (in directory "D:\Experimental_Workspace\HelloRxJava\mobile"): CreateProcess error=2, The system cannot find the file specified
14:13:04.528 [ERROR] [org.gradle.BuildExceptionReporter] at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
14:13:04.528 [ERROR] [org.gradle.BuildExceptionReporter] ... 5 more
14:13:04.528 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
14:13:04.528 [ERROR] [org.gradle.BuildExceptionReporter] ... 6 more
14:13:04.528 [ERROR] [org.gradle.BuildExceptionReporter]
14:13:04.528 [LIFECYCLE] [org.gradle.BuildResultLogger]
14:13:04.528 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
我不知道出了什么问题?请帮我?