0
votes

I've only just recently started using Xamarin, so please excuse my ignorance.

I have an application which uses Facebook to log users in, and might (depending on the customer) post achievements, etc. to Facebook.

So far, so good, the UI is in tact, a bit laggy, mind you, but it works nonetheless. I now wanted to add the Facebook API, as I've done a few times before, with pure Java. I added everything I needed to the manifest.xml, I added the v4 and v7 support libraries, and of course set everything up with Facebook.

Now, when I go ahead to compile the app, I get two compiler errors:

1) /Users/profile/Projects/xxx/Droid/obj/Debug/library_projects/Xamarin.Facebook/library_project_imports/res/layout/com_facebook_device_auth_dialog_fragment.xml(0,0): Error APT0000: No resource identifier found for attribute 'cardBackgroundColor' in package 'de.nwt.xxx' (APT0000) (xxx.Droid) 2) /Users/profile/Projects/xxx/Droid/obj/Debug/library_projects/Xamarin.Facebook/library_project_imports/res/layout/com_facebook_device_auth_dialog_fragment.xml(0,0): Error APT0000: No resource identifier found for attribute 'cardElevation' in package 'de.nwt.xxx' (APT0000) (xxx.Droid) I've tried adding a colour named "transparent" to my colours.xml (transparent is the name the API is looking for), but to no avail. I've updated all the packages in hopes of fixing it that way, but nothing has helped.

Any ides or solutions would be very much appreciated!

EDIT:

Here is the code the IDE shows me, where the error occurs: http://pastebin.com/df7zeeQh

1
Are you using cardView widget ? If so please also include the layout containing cardview. - Sreeraj
I'm merely implementing the Xamarin Facebook API. But yes, there's a CardView in there. Gimme two secs, and I'll post the code I found. - SimonC
Edited OP, added paste. - SimonC

1 Answers

1
votes

We need to add Android Support Library V7 CardView Xamarin Component from Component Store to work with CardViews (Support Library Version).

Right-Click on Components folder in Solution Explorer and click On Get More Components menu

enter image description here

Search for CardView and click on Android Support Library V7 CardView Component.

enter image description here

Then Click on Add To App. Component will be added to the project.