Crashlytics plugin destroys my project

I am trying to integrate Crashlytics into my application using the plugin you supplied in Android Studio. When I find to apply the change step, I click next and then it says that I have to build the project. When I try to build I start to get

No errors found in resources

And get

Error: (2) XML parsing error: The prefix must not bind to one of the reserved namespace names

xml where the error mentioned is inside the build folder of one of my library projects, it is named values.xml and it worked without issue before I ran the Crashlytics plugin. Also after running the plugin I can no longer build the project from the IDE or using gradle from the console even after running gradle clean, I also cannot do git revert because it says none of the files have changed. The only way to restore my project to its previous state is to delete the folder and re-clone from the remote device.

Does anyone know what's going on? What does this plugin do in my build folder?

More info: I am using the latest android studio from the beta channel. I downloaded the latest Crashlytics plugin today. And these are the versions of sdk and build files set in my gradle build minSdkVersion 18 targetSdkVersion 19 compileSdkVersion 21 buildToolsVersion "21.1.2"

+3


source to share


2 answers


I managed to solve my problem thanks to some git pointers from a colleague. In fact, I was newer to get the plugin to work, but implemented the crash tests manually following the docs.

Here is a solution to avoid re-cloning the project.

The problem is created by merging the com_crashlytics_export_strings.xml file resources with the rest of the xmls resources. When you run the plugin even before clicking the next step to apply changes to files, the plugin will create this xml inside SRC \ main \ res \ values ​​\



Note that in my case these values ​​were generated inside the library project because it was the only project that had a default project structure. All other projects, including the app, have a custom structure, and apparently the crashlytics plugin does not respect these settings. My problem with git was that android studio does not see this file because it was added by another tool, and the git working directory is clean since android studio incorrectly typed git add to this file.

Also note that when you run the plugin, another file is created in the crashlytics-build.properties resource folder. This file does not break the assembly, but may have some unwanted effects. This file appears to be used to "identify individual assemblies of your Android application". Why they use this data instead of the data provided in the manifest (in my case, correctly populated by our build script) is still a mystery to me, and I suspect that there are probably many error messages asking why their version names differ ...

Here is a link to the documentation for adding crashlytics manually https://dev.twitter.com/fabric/android/integrating

0


source


I fixed it. If I remember correctly, this is what I tried:

  • ionic build android

    (renouncement)
  • ionic platform remove android

  • cordova platform remove android

  • cordova plugin remove cordova-crashlytics-plugin

  • ./platforms/android/cordova/clean

  • cordova platform add android

  • ionic build android

    (success)
  • cordova plugin add https://github.com/4sh-projects/cordova-crashlytics-plugin

  • ionic build android

    (success)


If that doesn't help, please let me know and I'll have to review it again. I took a few extra steps trying to figure it all out, so I am.

+1


source







All Articles