Tuesday, October 25, 2011

Eclipse Weirdness

So I discovered what looks like a brand-spanking-new Facebook Android SDK tutorial yesterday. It makes using the SDK actually doable for me, as I couldn't make any sense of it before, although I suppose I've learned a lot since I last tried.

I booted up the ol' compy today and started Eclipse, only to find that the references to the SDK were not registering in my test program any more. Eclipse just had no idea what I was talking about any more when I said "import com.facebook.android.Facebook". The project reference was still there. I did all kinds of stuff to see if I could get it to register. No effing reason (can you tell I'm not happy with this?) why it shouldn't work.

Ultimately I just copied the whole package from the Facebook SDK into my project. It seems to work. There are a couple of drawable resources that I copied over to make it work too, but it shouldn't be that bad. As it is, I'm pretty sure the SDK is just a very thin wrapper over some web service calls. Admittedly, I don't know how to manipulate these calls myself, but that's why I suspect just coppying the code like this should work without a problem.

Fingers crossed.

Edit: upon closer inspection and fiddling, it seems these problems revolve around the version of Android associated with the project, as apparently the SDK uses features not available in certain versions. It hasn't resolved all the issues yet, but it's a step forward. One reason why this was a hard problem (for me at least) is because these problems specifically prevented Eclipse from compiling the R file, which unleashes calamity when it happens.

No comments:

Post a Comment