2

I'm using Crashlytics (part of Fabric now) in my eclipse Android project. The four automatically added Crashlytics libraries don't get recreated in my project after deleting them from file system.

  • Restart eclipse doesn't help
  • Reinstalling Fabric plugin doesn't help

The plugin says it's installed correctly, but I can't import:

io.fabric.sdk.android.Fabric;
com.crashlytics.android.Crashlytics;

Has anybody come to a similar situation?


Detailed description of how that happened for me:

When I installed the plugin for the first time, the plugin integrated into my project. It added a couple of .properties files and also 4 libraries (nested them weirdly to my project folder under /kit-libs/ and also added them to my workspace even though just one was set as a library project to my project).. Uhh, well, can't say I like this way of integration.

Anyway, I removed these automatically created libraries because I switched to an old commit of my project which hadn't used Fabric at that time and I needed to make a build quickly. I don't use any build tools for this project and I didn't find any information about how to remove the plugin, so I just deleted the libraries from file system and removed the library project.

When I switched back to current commit, the libraries got recreated. But I needed to do the same thing once again, so I switched to an old commit, deleted the library folders, removed library project and did my thing. However, after I switched back to a new commit, the 4 libraries don't get recreated anymore.

Will be glad for any tips.

Marcel Bro
  • 4,907
  • 4
  • 43
  • 70

4 Answers4

5

I eventually managed to get the libraries back to my project by checking out another commit (which included them).

After the library folders were back, I added /kit-libs/com-crashlytics-sdk-android_crashlytics as a library project to my project and everything worked again.

Now thinking about it, it may have been git's fault.


I also contacted Fabric support team and this is what they replied:

Try onboarding that app again by going to the plugin and clicking + New App in the right hand side. If you've removed all traces of Fabric, you should be able to re-onboard it, no problem.

However, I believe I removed all traces of Fabric, tried this and it didn't work - added my app to Fabric again, but it didn't recreate the libraries. It's hard to say what they mean by all traces of Fabric, it's not documented anywhere. Possibly it's:

/assets/crashlytics-build.properties (*)
/kit-libs 
/res/values/com_crashlytics_export_strings.xml (*)
/crashlytics.properties
/kits.properties

That's what I particularly don't like about this tool, it spreads its files all over the shop without you even knowing.

Another thing is, they also don't explicitly tell you that you shouldn't commit two of these files (*) to source control. You find out only by exploring the new files and noticing a comment:

Do NOT modify, delete, or commit to source control!

Marcel Bro
  • 4,907
  • 4
  • 43
  • 70
4

I had a similar issue, but my requirement was not to allow the twitter kit provided by Crashlytics (Fabric) to recreate itself every time i start eclipse.

I tried deleting the libraries from kit-libs but every time i restart eclipse the twitter kit was automatically added back into my project. I dug deep into the issue and found that there is file called kits.properties (you can find this next to your manifest file or somewhere down the lane).

This file specifies the Crashlytics libraries that needs to be loaded into your project. In my case i removed the package name com.twitter.sdk.android:twitter:1.1.0 (i only needed the twitter kit to be removed) which eventually stopped the re-creating process.

For your case, you need to put back the line com.crashlytics.sdk.android:crashlytics:2.1.0 into the file and restart eclipse for the library to be recreated. Please note, the package specified varies based on your installed version. The package name given above is the most recent one.

Vikram Ezhil
  • 995
  • 1
  • 9
  • 15
  • I've resolved it by getting the libraries from another commit. Thanks for the tip anyway, somebody may find it useful. – Marcel Bro Dec 17 '14 at 13:38
2

I had similar issue com-crashlytics-sdk-android_beta is deleted and project starts giving error that the com-crashlytics-sdk-android_beta file not found.

I cleaned all projects and this makes every thing working fine. Fabic added new library for the project.

Clean projects Step: 1) Go to Projects in eclipse from menu. 2) Click Clean. 3) Select clean all projects.

Rahul Vats
  • 277
  • 3
  • 17
0

I had a similar issues with the crashlytic libraries .jar files missing and not being re-built. The error message I got was: "The container 'Android Dependencies' references non existing library" for com-crashlytics-sdk-android_answers, _beta, _crashlytics, _crashlytics-core.

After many tries and searches over several days, I tried again and there was an upgrade of crashlytic. The upgrade itself did not solve the issue but the steps described by ValayPatel and georgiecasey in this post (note, I'm not working with any facebook APIs in my app): The container 'Android Dependencies' references non existing library 'facebook-android-sdk\facebook\bin\com_facebook_android.jar' it worked! Thanks to both!

Hope it helps who ever else gets that problem...

Litome
  • 653
  • 8
  • 12