Fabric Crashlytics stuck on build and run

2019-06-17 15:46发布

问题:

Currently, I'm trying to integrate Crashlytics into an Android Application. However I can't get the app to be recognized and added to the Fabric Dashboard.

When using the Android Studio Fabric plugin following these steps:

  1. New App
  2. Select Crashlytics
  3. Apply Code changes
  4. Sync gradle
  5. Rebuild project
  6. Build app onto device (not virtual)

However when I do this, the Fabric plugin is still stuck on the "Please build and run your application" screen, and eventually gives an error message "It's been a while. Need some help?"

I've also attempted to install Crashlytics manually, by adding the code myself using this link: https://fabric.io/kits/android/crashlytics/install

But when I build the application, still nothing happens within my Fabric Dashboard.

I've attempted checking out the branch again and re-adding this code to no avail. I've also tried reinstalling the Fabric IDE plugin, restarting Android Studio and Restarting my machine.

I have successfully added Crashlytics to other applications following these same steps.

Any ideas?

回答1:

I just had the same problem - nothing happened in the Fabric-plugin screen saying "Please build and run your application" during app-launches.

It started working after I disabled Instant Run (Preferences > Build Execution Deployment > Instant Run) then rebuilt and run the app.



回答2:

I also had this problem. Make sure you rename your application package identically to what the application ID is.

For instance, I had the package structure com/exampleapp/, but it should have been com/companydomain/appname, because the application id was com.companydomain.appname



回答3:

Have same issue here, i resolve doing these things:

First, add at your app build.graddle file:

defaultConfig {
    applicationId "<your package name>"
}

If that doesnt resolve, try change your applicationId to other one, that doesnt match with your package.

For some reason, they worked here.



回答4:

Probably you forgot to add apply plugin: 'io.fabric' in start of your app level gradle.build file



回答5:

Also had this issue, then

I refactored my application package name

and

changed application id name in gradle

built it again and the issue was solved.



回答6:

Make sure to include all dependencies on their dedicated gradle.build and meta in manifest file. Next is to throw a force runtime error on your device with internet connection also do not forget to initialize it first with Fabric.with(this,new Crashlytics()). If this doesn't work try to download Fabric for Android plugin in Android Studio and select your package.