- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这个项目以前来自 intellij,现在作为 Gradle android 项目迁移到 android studio。
我希望稍后使用 gradle 添加 google play 服务依赖项,我在其他地方找不到特定的 jar...
以前这个项目使用 ant 运行良好,在 android studio 中导入为 gradle 后,我得到 Gradle mergedebugresources 异常。
我尝试重建项目,将项目与 gradle 文件同步,但对我不起作用......我错过了什么吗?
希望有人指导我,我是 Gradle 和 android 工作室的新手。
Executing tasks: [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources]
Configuration on demand is an incubating feature. Incremental java compilation is an incubating feature. :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE :app:generateDebugBuildConfig UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources UP-TO-DATE :app:mergeDebugResources Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: :app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:mergeDebugResources'. Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
Try: Run with --info or --debug option to get more log output.
Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:mergeDebugResources'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.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:53) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110) at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43) at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30) at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:153) at org.gradle.internal.Factories$1.create(Factories.java:22) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150) at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32) at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98) at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83) at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99) at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:46) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.tooling.internal.provider.runner.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:58) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30) at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81) at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46) at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52) 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.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60) 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:72) 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.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41) 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:237) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54) at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40) Caused by: com.android.build.gradle.tasks.ResourceException: Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: at com.android.build.gradle.tasks.MergeResources.doFullTaskAction(MergeResources.java:161) at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:88) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:245) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:232) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) ... 70 more Caused by: Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: at com.android.ide.common.res2.MergedResourceWriter.end(MergedResourceWriter.java:268) at com.android.ide.common.res2.DataMerger.mergeData(DataMerger.java:301) at com.android.ide.common.res2.ResourceMerger.mergeData(ResourceMerger.java:410) at com.android.build.gradle.tasks.MergeResources.doFullTaskAction(MergeResources.java:154) ... 78 more Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299) at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286) at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116) at com.android.ide.common.res2.MergedResourceWriter.end(MergedResourceWriter.java:264) ... 81 more Caused by: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299) at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286) at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116) at com.android.builder.internal.aapt.v1.AaptV1.lambda$compile$0(AaptV1.java:446) Caused by: com.android.ide.common.process.ProcessException: at com.android.builder.png.AaptProcess$NotifierProcessOutput.out(AaptProcess.java:284) at com.android.builder.png.AaptProcess$ProcessOutputFacade.out(AaptProcess.java:215) at com.android.utils.GrabProcessOutput$2.run(GrabProcessOutput.java:143)
BUILD FAILED
Total time: 2.273 secs
最佳答案
很抱歉更新我的答案。
发现实际上是 9 block 图像格式错误,其中一个 9 block 图像没有正确绘制最外侧的黑色角线。
我的粗心错误!真的用photoshop不合适制作9个patch图片!
以前的 Ant 项目没有注意到这个问题。
现在使用 Gradle 进行适当的检查并抛出异常。
但是,日志消息对调试确实没有帮助!
关于android - Gradle 抛出应用程序 :mergedebugresources exception,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41207861/
我有这个问题错误:任务 ':app:mergeDebugResources' 执行失败。 Error: Some file crunching failed, see logs for details
我在尝试构建应用程序时收到此错误。我在此看到的堆栈问题似乎使用了过时版本的 gradle 并且手动更改版本似乎除了使 gradle 无法同步之外根本没有做任何事情。 FAILURE: Build f
今天我将 Android Studio 从 2.2 更新到 2.3 并在我的手机上运行应用程序后发生此错误。上周五一切正常。这个星期一的礼物毁了我一整天。 Gradle 设置是“使用本地 gradle
这样命名不同分辨率的资源文件可以吗: ...\src\main\res\drawable\about.48.png ...\src\main\res\drawable-hdpi\about.64.p
我最近将 Android Studio 更新到了最新版本,现在我在 Gradle 构建中遇到一个异常问题。 每次我运行项目,在它成功之前的两到三遍,我都会收到以下错误: Gradle: Executi
每次尝试构建或清理我的项目时,我都会收到“任务‘app:mergeDebugResource’执行失败”错误。我已经多次重新安装 Gradle、Java、Android Studio 和所有 SDK,
这个项目以前来自 intellij,现在作为 Gradle android 项目迁移到 android studio。 我希望稍后使用 gradle 添加 google play 服务依赖项,我在其他
我快要死了... 我有一个很好的项目,几个月后我不得不更改一些东西,现在它不再工作了。不知道,也许我在Android Studio中做了一些更改。 无论如何,这是我得到的错误: Executing t
当我第一次从我的 Android 设备制作 apk 文件时。我遇到此错误。有人可以帮助我吗? **任务“:app:mergeDebugResources”执行失败。 Could not resolve
如果我尝试在 Top - level build.gradle 文件中添加依赖项,则会出现以下错误。这种依赖关系对于在项目中添加 GCM 非常有用,没有它 GCM 将无法工作: 依赖: classpa
我的应用程序工作正常,然后我从 Git 添加了 VCS,并将我的 android studio 更新到了 2.2。现在我上周一直被这个错误困扰: Information:Gradle task
我想在 jenkins 上运行 espresso 测试。我在这里做了配置 https://www.perfectomobile.com/solutions/devtunnel/espresso-in-
我更新到 Android 3.4,并且正在开发一个 TO-DO 应用程序,当我想运行它时,它给了我这个错误: Executing tasks: [:app:assembleDebug] > Task
我正在使用 ionic 2 开发应用程序,运行“ionic build android”后出现以下错误 Error: cmd: Command failed with exit code 1 Erro
错误:任务 ':app:mergeDebugResources' 执行失败。 There were multiple failures while executing work items A fai
当我尝试运行该项目时,它显示了这个错误。 这些名字都是有效的,但这个错误仍然让我恼火! 这是错误: Error:Execution failed for task ':mergeDebugResour
我是 Android 编程新手。最近我一直在尝试向现有的回收 View 添加工具栏和选项卡栏。但是,添加元素后,Android Studio 突然提示这个问题。 错误。任务':app:mergeDeb
我在谷歌教程中使用 gradlew 构建调试应用程序 https://developer.android.com/training/basics/firstapp/running-app.html 我
错误:任务 ':app:mergeDebugResources' 执行失败。 Error: java.util.concurrent.ExecutionException: com.android.i
我正在尝试实现 Google ActivityRecognitionApi。但是我收到以下错误: Error:Failed to crunch file C:\Users\marschall\Desk
我是一名优秀的程序员,十分优秀!