- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
多年来一直试图调试这个问题。老实说,我对 Android Studio 不太熟悉,所以我希望得到一些帮助。当我去构建应用程序时,我得到以下信息:
Gradle: Execution failed for task ':mergeDebugAssets'.
> Could not call IncrementalTask.taskAction() on task ':mergeDebugAssets'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6+'
}
}
apply plugin: 'android'
apply plugin: 'newrelic'
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
}
}
buildscript {
dependencies {
classpath 'com.newrelic.agent.android:agent-gradle-plugin:2.397.0'
}
}
repositories {
mavenCentral()
}
apply plugin: 'android'
apply plugin: 'newrelic'
dependencies {
compile 'com.newrelic.agent.android:android-agent:2.397'
}
./gradlew --stacktrace assembleDebug
的输出
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:mergeDebugAssets FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mergeDebugAssets'.
> Could not call IncrementalTask.taskAction() on task ':mergeDebugAssets'
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':mergeDebugAssets'.
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:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
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.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:283)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$1.run(DefaultTaskPlanExecutor.java:33)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:214)
at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:276)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:142)
at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.longRunningOperation(DefaultTaskArtifactStateCacheAccess.java:78)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:31)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
at org.gradle.api.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:46)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.Main.main(Main.java:37)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: org.gradle.api.GradleException: Could not call IncrementalTask.taskAction() on task ':mergeDebugAssets'
at org.gradle.util.JavaMethod.invoke(JavaMethod.java:69)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:219)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:212)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:201)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:527)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:510)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 52 more
Caused by: java.lang.NoSuchMethodError: com.google.common.io.ByteStreams.hash(Lcom/google/common/io/InputSupplier;Lcom/google/common/hash/HashFunction;)Lcom/google/common/hash/HashCode;
at com.android.builder.internal.incremental.FileEntity.getSha1(FileEntity.java:187)
at com.android.builder.internal.incremental.FileEntity.computeAndReturnSha1(FileEntity.java:171)
at com.android.builder.internal.incremental.FileEntity.isDifferentThan(FileEntity.java:155)
at com.android.builder.internal.incremental.FileManager.processFile(FileManager.java:210)
at com.android.builder.internal.incremental.FileManager.processFile(FileManager.java:225)
at com.android.builder.internal.incremental.FileManager.processFile(FileManager.java:225)
at com.android.builder.internal.incremental.FileManager.addFile(FileManager.java:161)
at com.android.builder.internal.incremental.ChangeManager.addOutput(ChangeManager.java:104)
at com.android.builder.internal.incremental.ChangeManager$addOutput.call(Unknown Source)
at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.groovy:88)
at org.gradle.util.JavaMethod.invoke(JavaMethod.java:62)
... 59 more
BUILD FAILED
Total time: 7.304 secs
最佳答案
这听起来像是 Android Gradle 插件的错误安装。确保您使用的是最新版本,0.6.3 或更高版本(0.6.2 有问题,我们必须快速推出新版本),应该没问题。如果您仍然遇到问题,我会尝试删除您的 Gradle 缓存目录(通常是您的主目录中的 .gradle/caches
),然后重试。
关于gradle - 无法在任务 ':mergeDebugAssets' 上调用 IncrementalTask.taskAction(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19642280/
您应该如何在“.execute()”操作期间检索输出和错误,如果出现错误,则如何使任务失败?是否可以为project.copy {...}和类似任务自动处理错误?是否可以使用等效于project.sy
多年来一直试图调试这个问题。老实说,我对 Android Studio 不太熟悉,所以我希望得到一些帮助。当我去构建应用程序时,我得到以下信息: Gradle: Execution failed fo
类 MyTask 扩展了 DefaultTask { 字符串属性 = "默认" @TaskAction def grailsAppClean() { delete fileTree {
我无法读取的值属性在下面的 app.config 中。我完全不知所措。我怀疑 XPath 值或 Key 值。 目标 '$(OutDir)%(TargetPath)')" /
在 MainActivity 中,我有一个响应长按的 ContextMenu 和一个响应常规点击的常规 OnItemClickListener。 在实际上类似于 MainActivity 的 Task
不太确定这是怎么发生的。 运行最新的 Android Studio 版本 (0.3.6)。在属性表 (1.8) 中拥有正确的 Gradle 版本。 我注意到但现在不明白的一件事是在左侧的项目面板中,s
添加几个 png 后,我似乎无法运行我的应用程序。尽管我怀疑它与 build.gradle 有关。 总的来说,我是 Android 开发的新手,我似乎无法弄清楚 Android Studio 的这个问
有人建议我从 ActionBarActivity 扩展我的 Activity 类 这是之前的代码: import android.support.v7.app.ActionBar; import an
我最近决定从 Eclipse 切换到 Android Studio。我导入了一个我正在处理的项目,现在在尝试运行该项目时遇到此错误。 Gradle: Execution failed for task
我更新了 Android Studio 并开始收到此错误。我没有使用 gradle 的经验,因此似乎无法弄清楚可能出了什么问题。 这是完整的错误。 Gradle: Execution failed f
我有一个问题,大约 2 天我无法解决。我分析了几乎所有关于这个错误的问题,但我无法处理它。 这是我的树: MyAppRoot -MyApp -libs -jar4.jar
我是一名优秀的程序员,十分优秀!