Android Studio - 清单合并失败(系统找不到指定的路径)

时间:2014-06-03 05:51:24

标签: android-studio android-manifest build.gradle

我的笔记本电脑上有一个项目的Android Studio 0.3.2。 现在我需要将我的工作转移到台式PC上。 我尝试安装相同版本的Android Studio,但最终编译项目和错误如下。

现在我在桌面上安装了干净的Android Studio 0.5.2。 当我创建一个新项目时,会创建结构,但是当我尝试创建项目时,会出现相同的错误。

我不知道该怎么做,我在新项目中没有使用任何库。

错误:

07:29:43.097 [ERROR] [org.gradle.api.Project] [AndroidManifest.xml] Failed to write XML   file: javax.xml.transform.TransformerException: java.io.FileNotFoundException: D:\ (System cannot find the path specified)
07:29:43.114 [ERROR] [org.gradle.api.Project] [D:\### Projekty\Android\MyApplication2\app\build\manifests\debug\AndroidManifest.xml] Failed to write manifest file.
07:29:43.130 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':app:processDebugManifest'
07:29:43.145 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :app:processDebugManifest FAILED
07:29:43.161 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :app:processDebugManifest (Thread[main,5,main]) completed. Took 0.941 secs.
07:29:43.188 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 1.781 secs, idle: 0.24 secs
07:29:43.203 [ERROR] [org.gradle.BuildExceptionReporter]
07:29:43.227 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an  exception.
07:29:43.239 [ERROR] [org.gradle.BuildExceptionReporter]
07:29:43.249 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
07:29:43.263 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':app:processDebugManifest'.
07:29:43.277 [ERROR] [org.gradle.BuildExceptionReporter] > Manifest merging failed. See console for more info.
07:29:43.288 [ERROR] [org.gradle.BuildExceptionReporter]
07:29:43.312 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
07:29:43.322 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugManifest'.
07:29:43.331 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
07:29:43.339 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
07:29:43.354 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
07:29:43.373 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
07:29:43.401 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
07:29:43.408 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
07:29:43.434 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
07:29:43.444 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
07:29:43.454 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
07:29:43.462 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:289)
07:29:43.471 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
07:29:43.494 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
07:29:43.503 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
07:29:43.511 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
07:29:43.526 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
07:29:43.535 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
07:29:43.559 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
07:29:43.568 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
07:29:43.579 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
07:29:43.601 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
07:29:43.611 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
07:29:43.621 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
07:29:43.631 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:16 6)
07:29:43.642 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
07:29:43.667 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
07:29:43.676 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
07:29:43.704 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
07:29:43.730 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
07:29:43.737 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
07:29:43.746 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
07:29:43.754 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
07:29:43.768 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
07:29:43.779 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
07:29:43.789 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
07:29:43.800 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
07:29:43.811 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
07:29:43.821 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
07:29:43.829 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
07:29:43.855 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.Main.doAction(Main.java:46)
07:29:43.863 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
07:29:43.877 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.Main.main(Main.java:37)
07:29:43.901 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
07:29:43.910 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
07:29:43.919 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
07:29:43.928 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
07:29:43.939 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
07:29:43.965 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
07:29:43.972 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.RuntimeException: Manifest merging failed. See console for more info.
07:29:43.999 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.builder.AndroidBuilder.doMerge(AndroidBuilder.java:615)
07:29:44.009 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.builder.AndroidBuilder.mergeLibraryManifests(AndroidBuilder.java:584)
07:29:44.021 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.builder.AndroidBuilder.processManifest(AndroidBuilder.java:393)
07:29:44.033 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.builder.AndroidBuilder$processManifest.call(Unknown Source)
07:29:44.043 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.tasks.ProcessAppManifest.doFullTaskAction(ProcessAppManifest.groovy:83)
07:29:44.068 [ERROR] [org.gradle.BuildExceptionReporter]        at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.groovy:64)
07:29:44.078 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
07:29:44.085 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:236)
07:29:44.094 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:212)
07:29:44.105 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:223)
07:29:44.124 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:201)
07:29:44.134 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:533)
07:29:44.146 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:516)
07:29:44.154 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
07:29:44.163 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
07:29:44.172 [ERROR] [org.gradle.BuildExceptionReporter]        ... 46 more
07:29:44.180 [ERROR] [org.gradle.BuildExceptionReporter]
07:29:44.200 [LIFECYCLE] [org.gradle.BuildResultLogger]
07:29:44.209 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED

1 个答案:

答案 0 :(得分:0)

错误消息中的#个字符:

07:29:43.097 [ERROR] [org.gradle.api.Project] [AndroidManifest.xml] Failed to write XML   file: javax.xml.transform.TransformerException: java.io.FileNotFoundException: D:\ (System cannot find the path specified)
07:29:43.114 [ERROR] [org.gradle.api.Project] [D:\### Projekty\Android\MyApplication2\app\build\manifests\debug\AndroidManifest.xml] Failed to write manifest file.

似乎很可疑 - 看起来它正在切断#角色的路径。虽然#是Windows中的合法文件名字符(据我所知,其他所有操作系统),但工具链中的某些内容必须有错误。如果重命名目录,它应该可以工作。

请注意,Java中存在一个错误,导致Windows上出现非ANSI字符问题;如果您的项目位于包含非罗马字符的路径中,您将遇到问题。这在https://code.google.com/p/android/issues/detail?id=56102

中有记录