Open helloworkcupid opened 5 years ago
请先查看相关Wiki: Demo 工程运行须知 提问必看 常见问题解答(不定时更新)
这样我先详细提交构建流程,同时继续排查原因
classpath 'com.android.tools.build:gradle:3.2.0
宿主使用命令:gradlew clean assembleRelease 插件使用命令:gradlew clean assemblePlugin 宿主使用命令gradlew clean assembleRelease 正常 插件debug运行正常,但是使用gradlew clean assemblePlugin 的时候报错
E:\NewAndroidProject\Meeting\MeetingProject\build\intermediates\manifests\full\release\AndroidManifest.xml (系统找不到指定的路径。)
使用 gradlew clean assemblePlugin --stacktrace
错误日志 摘要
FAILURE: Build failed with an exception.
What went wrong: java.io.FileNotFoundException: E:\NewAndroidProject\Meeting\lib_share\build\intermediates\manifests\full\release\AndroidManifest.xml (系统找不到指定的路径。)
E:\NewAndroidProject\Meeting\lib_share\build\intermediates\manifests\full\release\AndroidManifest.xml (系统找不到指定的路径。)
Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Exception is: org.gradle.api.UncheckedIOException: java.io.FileNotFoundException: E:\NewAndroidProject\Meeting\lib_share\build\intermediates\manifests\full\release\AndroidManifest.xml (系统找不到指定的路径。) at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:57) at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:40) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:37) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.internal.event.DefaultListenerManager$ListenerDetails.dispatch(DefaultListenerManager.java:370) at org.gradle.internal.event.DefaultListenerManager$ListenerDetails.dispatch(DefaultListenerManager.java:352) at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58) at org.gradle.internal.event.DefaultListenerManager$EventBroadcast$ListenerDispatch.dispatch(DefaultListenerManager.java:340) at org.gradle.internal.event.DefaultListenerManager$EventBroadcast$ListenerDispatch.dispatch(DefaultListenerManager.java:327) at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42) at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230) at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149) at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140) at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37) at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) at com.sun.proxy.$Proxy91.afterExecute(Unknown Source) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:261) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:249) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:238) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:663) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:597) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98) 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: java.io.FileNotFoundException: E:\NewAndroidProject\Meeting\lib_share\build\intermediates\manifests\full\release\AndroidManifest.xml (系统找不到指定的路径。) at com.didi.virtualapk.collector.dependence.AarDependenceInfo.getPackage(AarDependenceInfo.groovy:103) at com.didi.virtualapk.collector.dependence.DependenceInfo.getProperty(DependenceInfo.groovy) at com.didi.virtualapk.hooker.ProcessResourcesHooker$_updateRJava_closure6.doCall(ProcessResourcesHooker.groovy:187) at com.didi.virtualapk.hooker.ProcessResourcesHooker.updateRJava(ProcessResourcesHooker.groovy:186) at com.didi.virtualapk.hooker.ProcessResourcesHooker$updateRJava$2.callCurrent(Unknown Source) at com.didi.virtualapk.hooker.ProcessResourcesHooker.repackage(ProcessResourcesHooker.groovy:153) at com.didi.virtualapk.hooker.ProcessResourcesHooker$repackage.callCurrent(Unknown Source) at com.didi.virtualapk.hooker.ProcessResourcesHooker.afterTaskExecute(ProcessResourcesHooker.groovy:71) at com.didi.virtualapk.hooker.ProcessResourcesHooker.afterTaskExecute(ProcessResourcesHooker.groovy) at com.didi.virtualapk.hooker.GradleTaskHooker$afterTaskExecute$0.call(Unknown Source) at com.didi.virtualapk.hooker.GradleTaskHooker$afterTaskExecute$0.call(Unknown Source) at com.didi.virtualapk.hooker.TaskHookerManager$VirtualApkTaskListener.afterExecute(TaskHookerManager.groovy:66) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) ... 30 more 多谢
补充下:插件不集成依赖库的时候,使用gradlew clean assemblePlugin命令不报错 比如使用这个命令 api project(':lib_share')集成依赖的时候 报错
补充 构建环境
VERSION_COMPILE_SDK = 28 VERSION_BUILD_TOOLS = '28.0.2' VERSION_MIN_SDK = 16 VERSION_TARGET_SDK = 28
https://github.com/didi/VirtualAPK/pull/317 这个可以解决。
3.1 、3.2 、3.3 的 Manifest 都是不同的目录
FAILURE: Build failed with an exception.
windows 环境