web-dev-qa-db-ja.com

Crashlyticsはマニフェストを見つけることができませんでした

ファブリック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)
20
Turnsole

マルチモジュールプロジェクトのいくつかのモジュールでも同様のビルドエラーが発生しました。場合によっては、_ManifestIOException: Crashlytics could not find the manifest_として現れることもあれば、com.crashlytics.tools.utils.PropertiesUtils.getProperties()のNullPointerExceptionが後に続く使用法ステートメントとして現れることもあります。

影響を受けるモジュールは両方とも、アプリケーションとそのライブラリモジュールの両方がCrashlyticsを使用していたライブラリモジュールでした。エラーを次のように修正しました。

  1. ライブラリbuild.gradleからアプリケーションbuild.gradleに次の行を移動します。

    _apply plugin: 'io.fabric'_

  2. crashlyticsブロックをライブラリbuild.gradleからアプリケーションbuild.gradleに移動します。

    _crashlytics { enableNdk true }_

アプリケーションとライブラリモジュールの両方でCrashlyticsの依存関係をそのまま残し、プラグインのみが再配置されました。 Crashlyticsは何らかの理由でライブラリモジュールに統合することを好まないようで、コンパイル時にそれについて不満を言うので、ライブラリが何かをする必要がある場合は、Crashlyticsをアプリモジュールに統合し、依存関係をライブラリに追加することをお勧めしますCrashlytics。

29
mbonness