Fabric Crashlytics stuck on build and run
Asked Answered
H

8

9

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?

Hume answered 20/6, 2017 at 18:58 Comment(12)
Take a time to fabric publish notifications on their dashboardPedagogue
@RodrigoGontijo I've been having this issue since yesterday, and I've had other apps be added almost instantaneously. I don't believe latency is the culprit.Hume
Mike from Fabric here. If you look at the Logcat output, do you see logging from Fabric indicating it's been initialized?Kinaesthesia
@MikeBonnell There is a log indicating initialization 06-21 11:55:43.186 18369-18369/com.app.id I/CrashlyticsCore: Initializing Crashlytics 2.3.17.devHume
Hmm, can you share the app's package name?Kinaesthesia
@MikeBonnell I have exactly the same problem. The app builds correctly and I see the same init text when the app starts '10-10 16:18:00.519 18138-18138/com.automo.app I/CrashlyticsCore: Initializing Crashlytics 2.3.17.dev' but the plugin will not verify the app. I don't want to open the same issue again. Hence, I'm trying to get help from you directly. Btw I tried Guppel's solution without success.Corrincorrina
Thanks @ThomasDittmar can you share your app's package name?Kinaesthesia
@MikeBonnell the package name is com.automo.app as shown in the output below.Corrincorrina
The app's not active currently within the Fabric dashboard which is why the data's not showing up. Can you try a clean, build and run with debug mode enabled to try and get the app to activate? docs.fabric.io/android/fabric/advanced-settings/debugging.htmlKinaesthesia
Had the same problem, turned out device has an issue with internet connectionCestus
Did you find any solution ?Trammel
Did you find any solution ?Nannie
S
6

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.

Syzran answered 26/6, 2017 at 11:9 Comment(0)
P
1

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

Penguin answered 18/7, 2018 at 4:21 Comment(0)
K
1

I have had a similar problem - month ago I refactored package name and inserted wrong char to name (cyrillic с instead of latin c), what I only have seen now by viewing java code in hex-editor. In the build.gradle applicationId = "package name" was write similar as package name in *.java files, but only all chars were the right in latin. Simple refactoring app package name to right name that equals the appliationId and clean/build project not solve that problem with the Fabric Crashlytics. May be wrong package name stay in another files, not only in *.java, manifest and gradle. I don`t know. Because I made fully refactoring by next step:

1) delete all lines of code that was added by Fabric plugin (if you used automatic code inserting) or that was added by you manually from build.gradle (app), AndroidManifest.xml, MainActivity.java.

2) replace old package name to new by Edit>Find>Replace in Path

3) manually copy all minimal needed project files to new project folder. I copyed these folder and files

NewProjectFolder/build.gradle
NewProjectFolder/app/build.gradle
NewProjectFolder/app/src/*
NewProjectFolder/app/libs/*

4) close current project, at "Welcome to Android Studio" select Import Project and select project in new project folder.

5) make some refactoring to run your app normally (I use Firebase, therefore I add this new app to my Firebase project in Firebase console and download the new google-services.json to NewProjectFolder/app/ )

6) be sure your app runs as well as before refactoring and stop it

7) start Fabric plugin, press "+New App" > "Crashlytycs" > "Install" > "Apply" to make auto-install fabric`s code to your build.gradle (app), AndroidManifest.xml, MainActivity.java.

8) run your app and wait "Done!" on Fabric plugin. After this you can see your app in Crashlytics dashboard.

It has worked for my project and I hope help to you.

Koah answered 18/6, 2019 at 6:27 Comment(0)
P
0

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

Photomontage answered 9/1, 2018 at 6:56 Comment(0)
P
0

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.

Parker answered 28/3, 2018 at 17:42 Comment(0)
S
0

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.

Slant answered 14/10, 2018 at 14:38 Comment(0)
B
0

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.

Batch answered 19/12, 2018 at 19:4 Comment(0)
P
0

This helped me: https://developer.android.com/studio/build/optimize-your-build#disable-crashlytics-build-id

If you want to use Crashlytics with your debug builds, you can still speed up incremental builds by preventing Crashlytics from updating app resources with its own unique build ID during every build. Because this build ID is stored in a resource file that is referenced by the manifest, disabling automatic build ID generation also allows you to use Apply Changes alongside Crashlytics for your debug builds.

To prevent Crashlytics from automatically updating its build ID, add the following to your build.gradle file:

android {
  ...
  buildTypes {
    debug {
      ext.alwaysUpdateBuildId = false
    }
}
Pycno answered 14/9, 2020 at 16:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.