Error:Gradle: Execution failed for task ':app:crashlyticsCleanupResourcesDebug'. > Crashlytics Developer Tools error

本小妞迷上赌 提交于 2019-11-28 07:55:51

You need to add your API Key to the Android Manifest:

<application>
    <meta-data
        android:name="com.crashlytics.ApiKey"
        android:value="your key here" />
</application>

This method solved my problem:

Remove or Comment this line (build.gradle):

  // apply plugin: 'io.fabric'

or if you have an ApiKey, define fabric ApiKey (AndroidManifest.xml)

    <meta-data
        android:name="io.fabric.ApiKey"
        android:value="yourApiKey012356465654" />

If you only want to compose a tweet with the SDK you can remove the line

apply plugin: 'io.fabric'

And the gradle build will work correctly

I also got the issue and resolved it by putting string directly in meta tag without defining the api key into string resources.

e.g. Replace

<meta-data
        android:name="io.fabric.ApiKey"
        android:value="@string/string_res_name_of_your_api_key" />

to

<meta-data
        android:name="io.fabric.ApiKey"
        android:value="your_api_key_string" />
Sanket Mendon

When you follow the steps for adding an application in your Crashlytics dashboard, they have mentioned a step to add the api key. In my case I was getting the same error when I would try to fetch the key from the strings.xml file. The problem was that crashlytics plugin uses a runtime api key insertion method and hence the build fails as it is not able to get the key from the strings file.

I tried below step:

  1. Add a manifest placeholder in your build.gradle's defaultConfig:
    defaultConfig {
    manifestPlaceholders = [ api_key_crashlytics:"xxxx__your_api_key"]}
  1. In your AndroidManifest.xml add below code inside your application tag:
<meta-data
      android:name="io.fabric.ApiKey"
      android:value="${api_key_crashlytics}" />

This worked for me.

sonal balekai

Open the Fabric Plugin which is already installed and update the Crashlytics, your problem gets solved

Please make sure you added

apply plugin: 'com.google.gms.google-services'

at the end of your build.gradle file.

I faced with this issue for sometimes, although I already had api key in manifest. Then I try assemble release apk before try to assemble to upload to Fabric. So let execute:

$ ./gradlew assembleRelease

then

$ ./gradlew assembleRelease crashlyticsUploadDistributionRelease

and it works well.

If you use distribution with Gradle you may have checked some properties like

ext.betaDistributionReleaseNotesFilePath=”path/to/release_notes.txt”

In our case we didn't have this file and the task crashed. To see the problem, go to Gradle console and check logs:

elfekz

I tried all of your solution suggests under that question and others. But all of them did not solve my problem. I solved my problem. My solution may solve your problem. I created empty res folder under main folder. project->src->main->res

Most likely the ApiKey is not correct just check it out. Worked for me.

Your key may have been entered on the wrong Android Manifest

 <meta-data
    android:name="io.fabric.ApiKey"
    android:value="yourApiKey" />          //You must have 40 words

You can get the code after registering and entering the project

https://fabric.io/home

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!