Crashlytics 找不到清单

Posted

技术标签:

【中文标题】Crashlytics 找不到清单【英文标题】:Crashlytics could not find the manifest 【发布时间】:2018-05-12 13:58:24 【问题描述】:

Fabric SDK(适用于 android)间歇性地失败构建并出现以下错误:

ERROR - Crashlytics Developer Tools error.
com.crashlytics.tools.android.project.ManifestData$ManifestIOException: Crashlytics could not find the manifest. Not found at /Users/Shared/Jenkins/Home/workspace/my_project@2/true
    at com.crashlytics.tools.android.project.ManifestFileProvider.getManifestStream(ManifestFileProvider.java:32)
    at com.crashlytics.tools.android.project.DefaultManifestData.createManifest(DefaultManifestData.java:124)
...

对于何时会或不会失败构建没有明显的模式,因此任何调试这个真正令人恼火的问题的线索将不胜感激。

/Users/Shared/Jenkins/Home/workspace/my_project@2/true

...看起来不像任何清单的路径,imo,但我不知道为什么它会在那里。

编辑添加:这是另一个构建的更完整的堆栈跟踪。 pull_request_build 是 Jenkins 作业的名称;它是项目的合法根目录。

15:41:46 ERROR - Crashlytics Developer Tools error.
15:41:46 com.crashlytics.tools.android.project.ManifestData$ManifestIOException: Crashlytics could not find the manifest. Not found at /Users/Shared/Jenkins/Home/workspace/pull_request_build@2/true
15:41:46    at com.crashlytics.tools.android.project.ManifestFileProvider.getManifestStream(ManifestFileProvider.java:32)
15:41:46    at com.crashlytics.tools.android.project.DefaultManifestData.createManifest(DefaultManifestData.java:124)
15:41:46    at com.crashlytics.tools.android.project.StandardAndroidProjectFactory.createTypedProject(StandardAndroidProjectFactory.java:176)
15:41:46    at com.crashlytics.tools.android.project.StandardAndroidProjectFactory.create(StandardAndroidProjectFactory.java:118)
15:41:46    at com.crashlytics.tools.android.project.StandardAndroidProjectFactory.create(StandardAndroidProjectFactory.java:93)
15:41:46    at com.crashlytics.tools.android.DeveloperTools.processProperties(DeveloperTools.java:483)
15:41:46    at com.crashlytics.tools.android.DeveloperTools.processArgsInternal(DeveloperTools.java:348)
15:41:46    at com.crashlytics.tools.android.DeveloperTools.gradleMain(DeveloperTools.java:292)
15:41:46    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:41:46    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:41:46    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:41:46    at java.lang.reflect.Method.invoke(Method.java:498)
15:41:46    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
15:41:46    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
15:41:46    at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.invoke(StaticMetaMethodSite.java:46)
15:41:46    at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:91)
15:41:46    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
15:41:46    at com.crashlytics.tools.gradle.tasks.FabricTaskBuilder.callDevtoolsWrappingRuntimeExceptions(FabricTaskBuilder.groovy:330)
15:41:46    at com.crashlytics.tools.gradle.tasks.FabricTaskBuilder.this$2$callDevtoolsWrappingRuntimeExceptions(FabricTaskBuilder.groovy)
15:41:46    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:41:46    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:41:46    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:41:46    at java.lang.reflect.Method.invoke(Method.java:498)
15:41:46    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
15:41:46    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
15:41:46    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384)
15:41:46    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
15:41:46    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
15:41:46    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
15:41:46    at com.crashlytics.tools.gradle.tasks.FabricTaskBuilder$_pluginGenerateResources_closure4.doCall(FabricTaskBuilder.groovy:129)
15:41:46    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:41:46    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:41:46    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:41:46    at java.lang.reflect.Method.invoke(Method.java:498)
15:41:46    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
15:41:46    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
15:41:46    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
15:41:46    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
15:41:46    at groovy.lang.Closure.call(Closure.java:414)
15:41:46    at groovy.lang.Closure.call(Closure.java:430)
15:41:46    at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:681)
15:41:46    at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:656)
15:41:46    at org.gradle.api.internal.tasks.TaskMutator$LeftShiftTaskAction.execute(TaskMutator.java:107)
15:41:46    at org.gradle.api.internal.tasks.TaskMutator$LeftShiftTaskAction.execute(TaskMutator.java:96)
15:41:46    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
15:41:46    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
15:41:46    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
15:41:46    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
15:41:46    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
15:41:46    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
15:41:46    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
15:41:46    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
15:41:46    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
15:41:46    at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
15:41:46    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
15:41:46    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
15:41:46    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
15:41:46    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
15:41:46    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
15:41:46    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
15:41:46    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
15:41:46    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
15:41:46    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
15:41:46    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
15:41:46    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
15:41:46    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
15:41:46    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
15:41:46    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
15:41:46    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
15:41:46    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
15:41:46    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
15:41:46    at java.lang.Thread.run(Thread.java:748)

【问题讨论】:

我阅读了***.com/q/35371480/597849,但我没有使用自定义的fabric.properties 文件,所以这无济于事。 来自 Fabric 的 Mike。你能分享你应用的 build.gradle 吗? 这是一个多模块项目。这些文件本身有一堆关于上传和报告的公司资料,所以我不太愿意将它们发布在这里。 谢谢,在这种情况下,我建议联系 support(at)fabric(dot)io 并参考此线程。 @mbonnes @Turnsole - 我在gradle.properties 中应用org.gradle.parallel=false 后问题消失了 【参考方案1】:

我们还在多模块项目中的几个模块中看到了类似的构建错误。有时它表现为ManifestIOException: Crashlytics could not find the manifest,其他时候表现为com.crashlytics.tools.utils.PropertiesUtils.getProperties() 中的NullPointerException 后跟的用法语句。

两个受影响的模块都是库模块,其中应用程序及其库模块都在使用 Crashlytics。我们将错误修复如下:

    将以下行从库 build.gradle 移动到应用程序 build.gradle:

    apply plugin: 'io.fabric'

    将任何 crashlytics 块从库 build.gradle 移动到应用程序 build.gradle:

    crashlytics enableNdk true

我们在应用程序和库模块中都保留了 Crashlytics 依赖项,只是重新定位了插件。似乎 Crashlytics 出于某种原因不喜欢集成到库模块中,并且会在编译时抱怨它,所以最好将 Crashlytics 集成到您的应用程序模块中,如果您的库需要做任何事情,只需将依赖项添加到库中使用 Crashlytics。

【讨论】:

以上是关于Crashlytics 找不到清单的主要内容,如果未能解决你的问题,请参考以下文章

使用 fastlane 在 crashlytics 包中找不到提交二进制文件

在 Eclipse 的 Crashlytics 安装中找不到存储库

找不到插件 Fabric Android Studio 导入 com.crashlytics & io.fabric

ld:找不到框架 Crashlytics Xcode7.2.1

在本机反应中找不到 Firebase crashlytics 崩溃日志?

即时应用架构的 Crashlytics 清单合并问题