Error when compiling app with Xamarin Facebook API

Hey there,

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!

Answers

  • RofiqSetiawanRofiqSetiawan USMember ✭✭✭
    edited April 2016

    @SimonCahill

    No resource identifier found for attribute 'cardElevation' in package 'de.nwt.xxx' (APT0000) 
    

    your error complaining about atribute cardElevation and cardBackgroundColor.
    Make sure you added Xamarin.Android.Support.v7.CardView package into your Solution.

  • SimonCahillSimonCahill USMember

    @RofiqSetiawan

    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.

    I've added this library to the solution.
    However, it still does not work. I've also cleaned and rebuilt the solution, also to no avail.

  • SimonCahillSimonCahill USMember

    Ok, so after rebooting the machine, and restarting Xamarin Studio, the error mentioned above has gone. Maybe a caching problem or something of the sorts?

    Anyways, now I get a different error:

    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Bolts.Tasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
    File name: 'Bolts.Tasks.dll'
    at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference reference, Mono.Cecil.ReaderParameters parameters) <0x69ee8d8 + 0x00423> in :0
    at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference reference) <0x75e5b80 + 0x0001f> in :0
    at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences (ICollection`1 assemblies, Mono.Cecil.AssemblyDefinition assembly, Boolean topLevel) <0x75e5238 + 0x0046b> in :0
    at Xamarin.Android.Tasks.ResolveAssemblies.Execute () <0x75e4660 + 0x00577> in :0 (xxx.Droid)

    Any ideas on this?

  • RofiqSetiawanRofiqSetiawan USMember ✭✭✭

    it means Xamarin Studio can't find your Bolts.Tasks.dll.
    is it from nuget package?
    try to rebuild your solution.

  • AlexanderOsokinAlexanderOsokin USMember ✭✭

    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: error : Tool exited with code: 2. Output:
    trouble writing output: Too many field references: 66329; max is 65536.
    You may try using --multi-dex option.

    https://github.com/xamarin/FacebookComponents/issues/27

Sign In or Register to comment.