我已经使用一段时间了,直到几天前,直到我设置ext.heap = ["enabled": false]
为止,我都无法构建运行我的项目而不会失败。我尚未对Gradle文件进行任何更改。我也尝试过更新到最新版本的Android堆(0.8.3),但没有运气。我唯一能想到的是将android studio更新到3.3.2可能导致了此问题。这是控制台输出:
Caused by: com.heapanalytics.android.gradle.HeapGradleException: Heap instrumentation failed with exit status 1
at com.heapanalytics.android.gradle.InstrumentationCommand.run(InstrumentationCommand.java:71)
at com.heapanalytics.android.gradle.HeapPlugin$1.lambda$execute$1(HeapPlugin.java:553)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:801)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:768)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:131)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99)
还有其他人在堆分析中遇到此问题或有任何建议吗?
谢谢
答案 0 :(得分:1)
我遇到了同样的问题,显然Heap(当前最新版本1.2.0
)与新的gradle插件版本不兼容。
我通过降级来解决:
classpath "com.android.tools.build:gradle:3.5.0"
到
classpath "com.android.tools.build:gradle:3.4.1"