FabricPlugin icon indicating copy to clipboard operation
FabricPlugin copied to clipboard

The plugin crashes with com.crashlytics.android.core.CrashlyticsMissingDependencyException

Open giordy opened this issue 7 years ago • 21 comments

Hello,

first of all thanks for your work :) I integrated your plugin and it worked well in the debug phase while testing the app in the emulator and the phone. The problem arised after I created the release apk and installed on the phone for testing. Then I got this exception:

02-21 14:17:21.347 13313 13313 I CrashlyticsCore: Initializing Crashlytics 2.3.8.97
02-21 14:17:21.350 13313 13313 E CrashlyticsCore: .
02-21 14:17:21.350 13313 13313 E CrashlyticsCore: .     |  | 
02-21 14:17:21.350 13313 13313 E CrashlyticsCore: .     |  |
02-21 14:17:21.350 13313 13313 E CrashlyticsCore: .     |  |
02-21 14:17:21.350 13313 13313 E CrashlyticsCore: .   \ |  | /
02-21 14:17:21.350 13313 13313 E CrashlyticsCore: .    \    /
02-21 14:17:21.350 13313 13313 E CrashlyticsCore: .     \  /
02-21 14:17:21.350 13313 13313 E CrashlyticsCore: .      \/
02-21 14:17:21.350 13313 13313 E CrashlyticsCore: .
02-21 14:17:21.351 13313 13313 E CrashlyticsCore: This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
02-21 14:17:21.351 13313 13313 E CrashlyticsCore: install an Android build tool and ask a team member to invite you to this app's organization.
02-21 14:17:21.351 13313 13313 E CrashlyticsCore: .
02-21 14:17:21.351 13313 13313 E CrashlyticsCore: .      /\
02-21 14:17:21.351 13313 13313 E CrashlyticsCore: .     /  \
02-21 14:17:21.351 13313 13313 E CrashlyticsCore: .    /    \
02-21 14:17:21.351 13313 13313 E CrashlyticsCore: .   / |  | \
02-21 14:17:21.351 13313 13313 E CrashlyticsCore: .     |  |
02-21 14:17:21.351 13313 13313 E CrashlyticsCore: .     |  |
02-21 14:17:21.351 13313 13313 E CrashlyticsCore: .     |  |
02-21 14:17:21.351 13313 13313 E CrashlyticsCore: .
02-21 14:17:21.352 13313 13313 D AndroidRuntime: Shutting down VM
02-21 14:17:21.354 13313 13313 E UncaughtException: 
02-21 14:17:21.354 13313 13313 E UncaughtException: java.lang.RuntimeException: Unable to start activity ComponentInfo{net.webikers.mobileapp/net.webikers.mobileapp.MainActivity}: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: com.crashlytics.android.core.CrashlyticsMissingDependencyException: 
02-21 14:17:21.354 13313 13313 E UncaughtException: This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
02-21 14:17:21.354 13313 13313 E UncaughtException: install an Android build tool and ask a team member to invite you to this app's organization.
02-21 14:17:21.354 13313 13313 E UncaughtException: 
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2450)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at android.app.ActivityThread.-wrap11(ActivityThread.java)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at android.os.Handler.dispatchMessage(Handler.java:102)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at android.os.Looper.loop(Looper.java:148)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at android.app.ActivityThread.main(ActivityThread.java:5461)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at java.lang.reflect.Method.invoke(Native Method)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
02-21 14:17:21.354 13313 13313 E UncaughtException: Caused by: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: com.crashlytics.android.core.CrashlyticsMissingDependencyException: 
02-21 14:17:21.354 13313 13313 E UncaughtException: This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
02-21 14:17:21.354 13313 13313 E UncaughtException: install an Android build tool and ask a team member to invite you to this app's organization.
02-21 14:17:21.354 13313 13313 E UncaughtException: 
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:288)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:236)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at io.fabric.sdk.android.InitializationTask.onPreExecute(InitializationTask.java:44)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at io.fabric.sdk.android.services.concurrency.AsyncTask.executeOnExecutor(AsyncTask.java:611)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at io.fabric.sdk.android.services.concurrency.PriorityAsyncTask.executeOnExecutor(PriorityAsyncTask.java:43)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at io.fabric.sdk.android.Kit.initialize(Kit.java:66)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at io.fabric.sdk.android.Fabric.initializeKits(Fabric.java:439)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at io.fabric.sdk.android.Fabric.init(Fabric.java:383)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at io.fabric.sdk.android.Fabric.setFabric(Fabric.java:340)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at io.fabric.sdk.android.Fabric.with(Fabric.java:311)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at com.sarriaroman.fabric.FabricPlugin.pluginInitialize(FabricPlugin.java:42)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at org.apache.cordova.CordovaPlugin.privateInitialize(CordovaPlugin.java:58)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:171)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:97)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at org.apache.cordova.PluginManager.init(PluginManager.java:86)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at org.apache.cordova.CordovaWebViewImpl.init(CordovaWebViewImpl.java:115)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:149)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:224)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at net.webikers.mobileapp.MainActivity.onCreate(MainActivity.java:39)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at android.app.Activity.performCreate(Activity.java:6251)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2403)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	... 9 more
02-21 14:17:21.354 13313 13313 E UncaughtException: Caused by: com.crashlytics.android.core.CrashlyticsMissingDependencyException: 
02-21 14:17:21.354 13313 13313 E UncaughtException: This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
02-21 14:17:21.354 13313 13313 E UncaughtException: install an Android build tool and ask a team member to invite you to this app's organization.
02-21 14:17:21.354 13313 13313 E UncaughtException: 
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at com.crashlytics.android.core.BuildIdValidator.validate(BuildIdValidator.java:59)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at com.crashlytics.android.core.CrashlyticsCore.setAndValidateKitProperties(CrashlyticsCore.java:319)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:262)
02-21 14:17:21.354 13313 13313 E UncaughtException: 	... 30 more
02-21 14:17:21.356 13313 13340 I FA      : Tag Manager is not found and thus will not be used
02-21 14:17:21.626 13313 13313 E AndroidRuntime: FATAL EXCEPTION: main
02-21 14:17:21.626 13313 13313 E AndroidRuntime: Process: net.webikers.mobileapp, PID: 13313
02-21 14:17:21.626 13313 13313 E AndroidRuntime: Theme: themes:{}
02-21 14:17:21.626 13313 13313 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{net.webikers.mobileapp/net.webikers.mobileapp.MainActivity}: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: com.crashlytics.android.core.CrashlyticsMissingDependencyException: 
02-21 14:17:21.626 13313 13313 E AndroidRuntime: This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
02-21 14:17:21.626 13313 13313 E AndroidRuntime: install an Android build tool and ask a team member to invite you to this app's organization.
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2450)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at android.app.ActivityThread.-wrap11(ActivityThread.java)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:148)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:5461)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: Caused by: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: com.crashlytics.android.core.CrashlyticsMissingDependencyException: 
02-21 14:17:21.626 13313 13313 E AndroidRuntime: This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
02-21 14:17:21.626 13313 13313 E AndroidRuntime: install an Android build tool and ask a team member to invite you to this app's organization.
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:288)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:236)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at io.fabric.sdk.android.InitializationTask.onPreExecute(InitializationTask.java:44)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at io.fabric.sdk.android.services.concurrency.AsyncTask.executeOnExecutor(AsyncTask.java:611)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at io.fabric.sdk.android.services.concurrency.PriorityAsyncTask.executeOnExecutor(PriorityAsyncTask.java:43)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at io.fabric.sdk.android.Kit.initialize(Kit.java:66)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at io.fabric.sdk.android.Fabric.initializeKits(Fabric.java:439)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at io.fabric.sdk.android.Fabric.init(Fabric.java:383)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at io.fabric.sdk.android.Fabric.setFabric(Fabric.java:340)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at io.fabric.sdk.android.Fabric.with(Fabric.java:311)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at com.sarriaroman.fabric.FabricPlugin.pluginInitialize(FabricPlugin.java:42)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at org.apache.cordova.CordovaPlugin.privateInitialize(CordovaPlugin.java:58)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:171)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:97)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at org.apache.cordova.PluginManager.init(PluginManager.java:86)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at org.apache.cordova.CordovaWebViewImpl.init(CordovaWebViewImpl.java:115)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:149)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:224)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at net.webikers.mobileapp.MainActivity.onCreate(MainActivity.java:39)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:6251)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2403)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	... 9 more
02-21 14:17:21.626 13313 13313 E AndroidRuntime: Caused by: com.crashlytics.android.core.CrashlyticsMissingDependencyException: 
02-21 14:17:21.626 13313 13313 E AndroidRuntime: This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
02-21 14:17:21.626 13313 13313 E AndroidRuntime: install an Android build tool and ask a team member to invite you to this app's organization.
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at com.crashlytics.android.core.BuildIdValidator.validate(BuildIdValidator.java:59)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at com.crashlytics.android.core.CrashlyticsCore.setAndValidateKitProperties(CrashlyticsCore.java:319)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:262)
02-21 14:17:21.626 13313 13313 E AndroidRuntime: 	... 30 more
02-21 14:17:21.629   666   933 W ActivityManager:   Force finishing activity net.webikers.mobileapp/.MainActivity

The other plugins I'm using are:

"cordovaPlugins": [
    {
      "id": "cordova-plugin-facebook4",
      "locator": "[email protected]",
      "variables": {
        "APP_ID": "XXXXXXXXXXXXXXX",
        "APP_NAME": "YYYYYYYYYY"
      }
    },
    "[email protected]",
    {
      "locator": "https://github.com/VitaliiBlagodir/cordova-plugin-datepicker.git#bd87605936b450dc32de0cddfb2ddb4936803fe0",
      "id": "cordova-plugin-datepicker"
    },
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]",
    {
      "locator": "https://github.com/kurtisf/cordova-plugin-restrict-keyboard#9076a8d16b2181910cd35910495413e5cc70218e",
      "id": "cordova-plugin-restrict-keyboard"
    },
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]"
  ]

Any idea why this might be happening?

Thanks in advance

giordy avatar Feb 21 '17 16:02 giordy

I've had this issue too. I think it might be related to https://github.com/sarriaroman/FabricPlugin/pull/80. I haven't had a chance to verify it yet but I think this is a potential fix for the problem https://github.com/sarriaroman/FabricPlugin/pull/87.

The other work around that I was using was to uninstall and reinstall the plugin after the npm install which helped temporarily fix the problem for me (although not the root cause).

davidquon avatar Feb 21 '17 19:02 davidquon

@davidquon I see, thanks for the prompt feedback!

giordy avatar Feb 22 '17 09:02 giordy

You will need to re-install the plugin. Latest version has the new Fabric plugin instead of Crashlytics.

sarriaroman avatar Feb 22 '17 12:02 sarriaroman

@sarriaroman - I uninstalled and re-installed the plugin. I can see updated code in the gradle file but still getting same error.

manishoswal avatar Feb 27 '17 07:02 manishoswal

@davidquon @giordy - Any luck with this, what i also observed is, release build has issues debug works fine .

manishoswal avatar Mar 10 '17 06:03 manishoswal

This happens using Phonegap Build. Packaging locally on Cordova builds properly.

PGB currently is not supporting hooks:

    <hook type="after_plugin_add" src="hooks/after_plugin_add.js" />
    <hook type="before_plugin_rm" src="hooks/before_plugin_rm.js" />

any way to get rid of them somehow and keep the project working?

kleeb avatar Mar 13 '17 19:03 kleeb

@sarriaroman I should mention that the first version I had ever installed in the project was the latest, 1.1.7

giordy avatar Mar 17 '17 14:03 giordy

Sorry guys, sometimes I take vacations :). Honestly I don't have recent experience with Phonegap build but must be some kind of replacement for the hooks because are required and the problem is there.

sarriaroman avatar Mar 17 '17 15:03 sarriaroman

I am also having this problem but also in development mode.

I think this has something to do with the "src/android/build-extras.gradle" file.

In the main build.gradle, if I add the steps that Fabric modifies automatically from the Android Studio Fabric Tool and comment out: apply from: "cordova-fabric-plugin/myproject-build-extras.gradle" it works.

screen shot 2017-03-18 at 14 22 51

Can anyone else confirm this fixes it for them also?

RobertYoung avatar Mar 18 '17 14:03 RobertYoung

@RobertYoung I was having the same issue and your fix worked for me. Does anyone have a more permanent solution?

ashbrener avatar Mar 22 '17 02:03 ashbrener

Any updates on this issue ?

sahildaga95 avatar May 19 '17 07:05 sahildaga95

Unfortunately not, however I have hacked it and so it is automated for the time being. I've added a cordova hook to amend the android files after the platform has been added.

/hooks/after_platform_add/010_install_fabric_android.js

#!/usr/bin/env node

console.log("> 010_install_fabric_android.js");

const fs = require('fs');
const gradleBundlePath = `./platforms/android/build.gradle`;
const gradleBundleEncoding = `utf8`;
const mainActivityPath = `./platforms/android/src/com/iamrobertyoung/settimes/MainActivity.java`;
const mainActivityEncoding = `utf8`;

function installFabricForAndroid() {
  if (!fs.existsSync(gradleBundlePath) || !fs.existsSync(mainActivityPath)) {
    console.warn(`Cannot find android related files`);
    return;
  };

  replaceGradleBundle();
  replaceMainActivity();
}

function replaceGradleBundle() {
  var gradleBundle = readGradleBundle();
  var newGradleBundle = gradleBundle.replace(`apply plugin: 'com.android.application'`, `
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}
  `)
    .replace(`repositories {
        mavenCentral()
        jcenter()
    }`,
    `repositories {
        mavenCentral()
        jcenter()
        maven { url 'https://maven.fabric.io/public' }
    }`)
    .replace(`dependencies {
        classpath 'com.android.tools.build:gradle:2.1.0'
    }`,
    `dependencies {
        classpath 'com.android.tools.build:gradle:2.1.0'
        classpath 'io.fabric.tools:gradle:1.+'
    }`)

  writeGradleBundle(newGradleBundle);
}

function replaceMainActivity() {
  var mainActivity = readMainActivity();
  var newMainActivity = mainActivity.replace(`import android.os.Bundle;`,
    `import android.os.Bundle;
import com.crashlytics.android.Crashlytics;
import io.fabric.sdk.android.Fabric;`)
    .replace(`super.onCreate(savedInstanceState);`,
    `super.onCreate(savedInstanceState);
        Fabric.with(this, new Crashlytics());`);

  writeMainActivity(newMainActivity);
}

function readGradleBundle() {
  return fs.readFileSync(gradleBundlePath, gradleBundleEncoding);
}

function writeGradleBundle(bundle) {
  return fs.writeFileSync(gradleBundlePath, bundle);
}

function readMainActivity() {
  return fs.readFileSync(mainActivityPath, mainActivityEncoding);
}

function writeMainActivity(mainActivity) {
  return fs.writeFileSync(mainActivityPath, mainActivity);
}

installFabricForAndroid();

Yes this is dirty, and will most likely break, but it's a workaround.

RobertYoung avatar May 19 '17 08:05 RobertYoung

Just ran through this, was able to resolve by adding the assorted hook files then:

ionic cordova plugin rm cordova-fabric-plugin --save
ionic cordova platform rm android
ionic cordova platform rm ios

# Edited config.xml to add hooks:
# <hook src="hooks/after_plugin_add.js" type="after_plugin_add" />
# <hook src="hooks/before_plugin_rm.js" type="before_plugin_rm" />

ionic cordova platform add android
ionic cordova platform add ios
ionic cordova plugin add https://github.com/sarriaroman/FabricPlugin --variable FABRIC_API_KEY=XXX --variable FABRIC_API_SECRET=xxx --save

Somewhere in the middle of testing this sequence for reliability, I discovered that Android Studio couldn't find a bunch of Java classes on the Crashlytics framework - seems like maybe there was outdated code. This is what prompted me to remove the original cordova-fabric-plugin and reinstall from Github source (master branch).

I am now able to perform all builds by CLI:

ionic cordova build android
ionic cordova build android --release
ionic cordova build ios
ionic cordova build ios --release

... as well as build the project cleanly from XCode and Android Studio.

emcniece avatar Jun 14 '17 02:06 emcniece

@emcniece You rock! I have tried re-installing the plugin directly from GH but it didn't help. I think the hooks are key.

nmartin867 avatar Jun 14 '17 17:06 nmartin867

@nmartin867 good to hear! Beware though, as noted by https://github.com/sarriaroman/FabricPlugin/issues/88#issuecomment-286214951 it looks like Phonegap doesn't run these hooks.

But if you're not using Phonegap... ¯\_(ツ)_/¯

I'm using https://fastlane.tools/ - builds happen locally.

emcniece avatar Jun 14 '17 18:06 emcniece

solved using version 1.1.6

ionic cordova plugin add https://github.com/sarriaroman/FabricPlugin#1.1.6 --variable FABRIC_API_KEY=XXX --variable FABRIC_API_SECRET=xxx --save

marcllucia avatar Oct 10 '17 10:10 marcllucia

Does it still not working on Phonegap build?... Looks like i have the same issue, as in the top of this topic..

nightwolf13 avatar Jan 13 '18 21:01 nightwolf13

I have the same issue with version 1.1.7

pph7 avatar Mar 02 '18 11:03 pph7

@pph7 do you see your Fabric API key/secret in config.xml?

<plugin name="cordova-fabric-plugin" spec="^1.1.9">
        <variable name="FABRIC_API_KEY" value="xxxxxxxxxxxxxxxxxxxx" />
        <variable name="FABRIC_API_SECRET" value=""xxxxxxxxxxxxxxxxxxxx" />
    </plugin>

emcniece avatar Mar 02 '18 18:03 emcniece

Yes, exactly like that.

pph7 avatar Mar 02 '18 20:03 pph7

any update on this issue.

mo7amd avatar Apr 30 '18 13:04 mo7amd