Open sjindong opened 5 years ago
@sjindong 请使用最新版本0.4.85版本试一下哈
@hedex
可以正常编译过了 ,初步感觉是 可以了
我使用的是 classpath 'com.android.tools.build:gradle:3.3.0'
然后报了下面的Warning,目前不是强制性修改,
19年还能用,到20年就要报错了,提前说下。
API 'variantOutput.getPackageApplication()' is obsolete and has been replaced with 'variant.getPackageApplicationProvider()'. | API 'variant.getAssemble()' is obsolete and has been replaced with 'variant.getAssembleProvider()'. | API 'variantOutput.getProcessManifest()' is obsolete and has been replaced with 'variantOutput.getProcessManifestProvider()'. | API 'variantOutput.getProcessResources()' is obsolete and has been replaced with 'variantOutput.getProcessResourcesProvider()'. |
顺便说句,新年快乐
@hedex 异常类型:编译异常 Robust版本:0.4.85 GradlePlugin版本:3.3.1 Gradle版本:4.10.1 compileSdkVersion 28 buildToolsVersion '28.0.3' defaultConfig { applicationId "com.meituan.robust.sample" minSdkVersion 14 targetSdkVersion 28 versionCode 1 versionName "1.0" } 系统:OSX 说明:copy的sample,修改了版本号,build.gradle里不加apply plugin: 'robust'可以正常打包,加上并且调用./gradlew clean assembleRelease --stacktrace --no-daemon,就只生成mapping.txt和methodsMap.robust,而不生成apk
Task :app:packageRelease FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:packageRelease'.
Cannot cast object 'com.android.build.gradle.internal.scope.BuildArtifactsHolder$FinalBuildableArtifact@246989cb' with class 'com.android.build.gradle.internal.scope.BuildArtifactsHolder$FinalBuildableArtifact' to class 'org.gradle.api.file.FileCollection'
Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:packageRelease'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:110) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77) at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59) at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101) at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91) at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51) 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.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46) at org.gradle.execution.taskgraph.LocalTaskInfoExecutor.execute(LocalTaskInfoExecutor.java:42) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:277) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:262) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:135) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.run(DefaultTaskPlanExecutor.java:130) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'com.android.build.gradle.internal.scope.BuildArtifactsHolder$FinalBuildableArtifact@246989cb' with class 'com.android.build.gradle.internal.scope.BuildArtifactsHolder$FinalBuildableArtifact' to class 'org.gradle.api.file.FileCollection' at robust.gradle.plugin.RobustApkHashAction$_execute_closure1$_closure2.doCall(RobustApkHashAction.groovy:34) at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:739) at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:712) 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) ... 31 more
Get more help at https://help.gradle.org
BUILD FAILED in 26s 31 actionable tasks: 30 executed, 1 up-to-date
这边实测gradle4.7可以,4.10.1不行,但是as最新的3.3.1又最低只支持4.10.1,还望早日更新吧
Minimum supported Gradle version is 4.10.1. Current version is 4.7. If using the gradle wrapper, try editing the distributionUrl in /Users/chnng/AndroidStudioProjects/robustdemo/gradle/wrapper/gradle-wrapper.properties to gradle-4.10.1-all.zip
同上 啥时候早日更新啊!现在用的4.10.1,gradle版本3.2了
异常类型:编译异常
手机型号:
手机系统版本:
Robust版本:0.4.82
Gradle版本:3.2.1
系统:window
个人分析: 看robust的源码是使用gradle2.1.0,配置说明是2.1.0+,include 3.0, 然而个人的是3.2.1; 是不是我本地gradle版本太高 导致不兼容了?
堆栈/日志:(没有添加 --stacktrace,先把当前log附上) FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':robust:packageRelease'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. See https://docs.gradle.org/4.6/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2s