Tuesday 2 June 2015

Time Slip

Programming, for non professionals really can be a challenge at times. But the satisfaction that comes after solving a 2-day old problem really can be a cheap thrill.
At the beginning of last night, I decided to add Facebook sharing to Float. 

All was going reasonably well. The Facebook instructions were specific to Android Studio, while I use Eclipse, but this post helped me enormously in that respect. He explains how the Facebook project will have missing dependency errors when first added to eclipse, but it's easy enough to identify them and add them. 

His example was the android-support-v4.jar but I also found the android-support-annotations.jar was needed. Working through these steps and then the Facebook guide for a sharing intent I made my first Facebook post from Float.

Then I unintentionally initiated a 2-day programming time slip. I don't remember what prompted me, but I started updating a lot of things using the Android package manager. All hell broke loose and nothing would build!

Two long, late nights were spent trying to get my updated Eclipse and ADT environment, and my Float project to play nicely, when finally I stumbled on this remarkably simple solution...
Turns out, in my updated packages, android-support-annotations.jar is included in android-support-v4.jar. removing android-support-annotations.jar from my Facebook project solved all my problems.

Luckily I didn't try anything to drastic without being able to undo my changes before finding this out. Interestingly, this wasn't even the accepted answer to the Stackoverflow question (though it has the most votes). Sometimes you just stumble on the right answer.

So, two nights lost, maybe I'll finish adding Facebook to Float tomorrow.

(photo of cat is for no reason other than it ids a funny cat).