Open rfeniak opened 7 years ago
Same problem, but I don't even understand the solution :/
Which Cordova version are you using? With Cordova 6.5.0 I can successfully use the Fabric plugin but when I moved my project to Cordova 7.0.1 there's a runtime exception of type UnmetDependencyException
Any solutions or workaround found?
I can confirm that there is an issue with cordova-cli v7.1...
I've created a cordova hook (after_plugin_install) and it wortks now for cordova v7 :
#!/usr/bin/env node
var fs = require('fs');
var path = require('path');
var uuidV4 = require('uuid/v4');
var xml2js = require('xml2js');
module.exports = function crashlyticsExportStrings(context) {
if (context.opts.plugin.id !== 'cordova-fabric-plugin') {
return ;
}
var filePath = path.join(context.opts.projectRoot, 'platforms', 'android', 'res', 'values', 'com_crashlytics_export_strings.xml');
var uuid = uuidV4();
var builder = new xml2js.Builder({
'xmldec' : {
encoding: "utf-8",
standalone: false
}
});
var xml = builder.buildObject({
resources: {
string: {
$: {
"xmlns:ns0": "http://schemas.android.com/tools",
name: "com.crashlytics.android.build_id",
"ns0:ignore": "UnusedResources,TypographyDashes",
translatable: false
},
_: uuidV4()
}
}
});
fs.writeFileSync(filePath, xml, 'utf8');
};
Hi guys, I'm using your plugin and I've faced with following issue: When I build android debug application with "ionic build android" command all works fine, I can simulate crashes and see statistic in dashboard. But when I build app for production release with "ionic build android --release" I got following error: Unfortunately, "app name" has stopped. Via adb logcat I got error: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: This app relies on Crashlytics. Please sign up for access at https://fabric.io/signup
I was able to fix that issue by creation of additional file \mobile\platforms\android\res\values\com_crashlytics_export_strings.xml with following content:
`<?xml version="1.0" encoding="utf-8" standalone="no"?>