Crashlytics could not find the manifest when update build:gradle to 3.3.0

Have you tried configuring everything exactly as required for a Crashlytics setup with a library module and a base project? It seems the new Gradle plugin doesn't work if the setup is different from the one recommended here.

For me removing "apply plugin: 'io.fabric'" from the library's build.gradle file (but leaving it in the application build.gradle) solved this error.


I had the same issue and fixed it for me like following, using Ionic 5, Capacitor and the Cordova FirebaseX Plugin (which references to Crashlytics) , may you need to adjust some paths to fit your environment:

  1. Running the Gradlew Build Command like ./gradlew assembleDebug.
  2. Waiting for the error you get.
  3. Copy the AndroidManifest.xml from your-app/src/main/AndroidManifest.xml to your-app/build/intermediates/merged_manifests/debug/AndroidManifest.xml.
  4. Re-Run the Gradlew Build Command, ./gradlew assembleDebug`.
  5. Your build process should succeed now.

In my case with Ionic 5 and Capacitor the paths are:

  • android/capacitor-cordova-android-plugins/src/main/AndroidManifest.xml
  • android/capacitor-cordova-android-plugins/build/intermediates/merged_manifests/debug/AndroidManifest.xml

Hope it helps you.


I've got a fix for this while keeping Crashlytics dependencies out of the app module, but it's very hacky.

From what I can tell the io.fabric plugin primarily exists to generate a build ID for crashlytics, which is important to the Fabric platform but goes unused for Firebase. This, I assume, is vestigial functionality that will eventually be removed when Crashlytics completes its migration to Firebase, but in the meantime it's quite necessary simply because Crashlytics checks for it and crashes your app if it's not there.

So, I simply created a useless dummy build ID and removed all mention of the ui.fabric plugin from my modules, and it works! My code compiles and reports crashes to the firebase console as it did previously, and I can update to android gradle plugin v3.3.0+ with no issues.


The specific steps I took were:

Add this to the main/res/values.xml file in the module that uses crashlytics:

<string name="com.crashlytics.android.build_id" translatable="false">RANDOM_UUID</string>

And remove all usages of the io.fabric gradle plugin, as well as the classpath dependency on the gradle plugin (as you no longer use it).


Note that, as I said, this is very hacky. I'd suggest testing this thoroughly if you take this approach for your project. There might be some functionality that does still use the build ID and this would cause it to break.

EDIT: after further investigation I believe that doing this will prevent crashlytics from uploading your mapping file, which means you will have to manually deobfuscate stack traces. This is still an option at least, but does seem to have drawbacks. Also worth noting that you can also simply use:

<string name="com.crashlytics.RequireBuildId">false</string>

instead of providing a dummy build ID.

Tags:

Android

Gradle