Is there now a way to use the facebook plugin unity at the same time as other plugins (prime31 for example)?
I use multiple plugin other than facebook (push, in app purchase), and when I import the facebook plugin, it is impossible to compile because of resource sharing. I found a lot of topics on this issue, but I have not been able to solve my problem.
Here is an example of compile-time errors:
stderr[
res\values\attrs.xml:20: error: Attribute "show_pictures" has already been defined
res\values\attrs.xml:21: error: Attribute "extra_fields" has already been defined
res\values\attrs.xml:22: error: Attribute "show_title_bar" has already been defined
res\values\attrs.xml:23: error: Attribute "title_text" has already been defined
res\values\attrs.xml:24: error: Attribute "done_button_text" has already been defined
res\values\attrs.xml:25: error: Attribute "title_bar_background" has already been defined
res\values\attrs.xml:26: error: Attribute "done_button_background" has already been defined
res\values\attrs.xml:29: error: Attribute "multi_select" has already been defined
res\values\attrs.xml:32: error: Attribute "radius_in_meters" has already been defined
res\values\attrs.xml:33: error: Attribute "results_limit" has already been defined
res\values\attrs.xml:34: error: Attribute "search_text" has already been defined
res\values\attrs.xml:35: error: Attribute "show_search_box" has already been defined
res\values\attrs.xml:38: error: Attribute "confirm_logout" has already been defined
res\values\attrs.xml:39: error: Attribute "fetch_user_info" has already been defined
res\values\attrs.xml:40: error: Attribute "login_text" has already been defined
res\values\attrs.xml:41: error: Attribute "logout_text" has already been defined
res\values\attrs.xml:44: error: Attribute "preset_size" has already been defined
res\values\attrs.xml:50: error: Attribute "is_cropped" has already been defined
]
If anyone has a solution let me know!
thank you,
This happened to me when I had multiple attrs.xml files in my plugins folder, probably because of using the Facebook Unity plugin along with the Prime31 unity plugin. I deleted one of the attrs.xml files (which I found using the Unity search function) and then this error went away.
You can use multiple plugins from prime31 at the same time, just make sure that you have only one copy of P31RestKit.dll.
Related
there is a ton of questions pertaining to this type of exception an i really dont get how it came about. I guess the exception is telling me that there are a bunch of date picker attributes that it expected to find in the styles file of my app that it could not find and I do not understand why as I swear exactly the same code was compiling flawlessly a few months back. What I dont inderstand is why its even looking for those in my project folder all those attrs are actually found and well defined on the values file where the exception stems from. all suggestions such as cleaning and rebuilding or upgrading to androidx have not worked. this is so vexing
AAPT: C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3535: error: style attribute 'attr/minDate (aka com.example.android.gymlogmulti.generic:attr/minDate)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3536: error: style attribute 'attr/maxDate (aka com.example.android.gymlogmulti.generic:attr/maxDate)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3544: error: style attribute 'attr/weekDayTextAppearance (aka com.example.android.gymlogmulti.generic:attr/weekDayTextAppearance)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3545: error: style attribute 'attr/dateTextAppearance (aka com.example.android.gymlogmulti.generic:attr/dateTextAppearance)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3551: error: style attribute 'attr/datePickerMode (aka com.example.android.gymlogmulti.generic:attr/datePickerMode)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3552: error: style attribute 'attr/dtp_legacyLayout (aka com.example.android.gymlogmulti.generic:attr/dtp_legacyLayout)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3553: error: style attribute 'attr/calendarViewShown (aka com.example.android.gymlogmulti.generic:attr/calendarViewShown)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3638: error: style attribute 'attr/weekDayTextAppearance (aka com.example.android.gymlogmulti.generic:attr/weekDayTextAppearance)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3639: error: style attribute 'attr/dateTextAppearance (aka com.example.android.gymlogmulti.generic:attr/dateTextAppearance)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3644: error: style attribute 'attr/datePickerMode (aka com.example.android.gymlogmulti.generic:attr/datePickerMode)' not found.
I just found the source of the issue by using CTRL+SHIFT+F and looking for the problematic attributes in the code (of the entire scope). Turns out the culprit was a third party dependency. Once i uninstalled it it was fixed. I guess the issue came from updating gradle and these outdated libraries somehow interfering with it.
I still dont understand the nature of the issue exactly but I hope this helps someone else dealing with the same issue. I just spent waaay to long looking at this.
I have a Xamarin Forms project and now I'd like to improve it with the new Visual / Material features.
On IOS, it works like a charm.
On Android I have strange problems: after adding Xamarin.Forms.Visual.Material nuget I get weird error messages and my project does not build:
\res\values\values.xml(6): error APT0000: Attribute "statusBarBackground" already defined with incompatible format.
\res\values\values.xml(2): error APT0000: Original attribute defined here.
\res\values\values.xml(10): error APT0000: Attribute "layout_anchorGravity" already defined with incompatible format.
\res\values\values.xml(2): error APT0000: Original attribute defined here.
\res\values\values.xml(17): error APT0000: Attribute "layout_insetEdge" already defined with incompatible format.
\res\values\values.xml(2): error APT0000: Original attribute defined here.
\res\values\values.xml(17): error APT0000: Attribute "layout_dodgeInsetEdges" already defined with incompatible format.
\res\values\values.xml(2): error APT0000: Original attribute defined here.
\res\values\styles.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Theme.MaterialComponents.Light.DarkActionBar'.
\res\values\styles.xml(2): error APT0000: No resource found that matches the given name: attr 'materialButtonStyle'.
\res\values\styles.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Widget.MaterialComponents.Button'.
\res\values\styles.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Widget.MaterialComponents.Button.OutlinedButton'.
\res\values\styles.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Widget.MaterialComponents.TextInputLayout.FilledBox'.
\res\values\styles.xml(2): error APT0000: No resource found that matches the given name: attr 'boxCollapsedPaddingTop'.
I use Visual Studio 2017 Professional on Windows, I don't use any prerelease nuget.
Xamarin.Forms version is 3.6.0.293080.
Minimum Android API level is 21, target is 28, and compiled with 28.
Xamarin Android support libraries version is 28.0.0.1.
I tried the usual tricks (delete bin, obj dir, restart Visual Studio, run it in admin mode, delete Xamarin app data...) but neither helped.
The same thing happens if I create a new project from schratch, and don't do anything with it, just add visual.material nuget to the Android project.
Do you have any suggestions? Thanks a lot!
I had the same issue a few days ago where I first had TargetFramework set to Android 8.1, installed same packages and later changed it to Android9 and installed a new package.
The Xamarin.Forms.Visual.Material requires Android 9 to be set in Android project options and you previously had 8.1 configured and installed nuget packages for Android 8.1.
If you still use old packages.config like me to add NuGet packages, make sure you always see same monodroid string in hint path in the csproj and don't mix 81 with 90 and always have monoandroid90.
<Reference Include="Xamarin.Forms.Visual.Material , Version=3.6.0.293080, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xamarin.Forms.Material.3.6.0.293080\lib\monoandroid90\Xamarin.Forms.Material.dll</HintPath>
</Reference>
After changing TargetFramework to 9, open Package Manager Console and run
Update-Package -Reinstall -IgnoreDependencies
to let VS update the packages.config and csproj.
I found this answer on github:
Migrating Package.json File to PackageReference to resolved problem.
1 - Click right on packages.config in Android Project
2 - Click on Migration Package.config to PackageReference
3 - Accept
4 - Run Project
Ref: https://github.com/xamarin/Xamarin.Forms/issues/5828
I also updated references with Nuget, done a clean, removed obj and bin fonder, and then Build.
hello i want to ask about android error message and i want to know how to solve this issue.
im develop it with react native, and i wanted to know what does it mean and how to solve it.
you can see the error here bellow
home/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.0.2.aar/588cc028d2e630da3036f4ad87f9dbb3/res/values/values.xml:252:5-69: AAPT: Attribute "aspectRatio" already defined with incompatible format.
home/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.0.2.aar/588cc028d2e630da3036f4ad87f9dbb3/res/values/values.xml:252:5-69: AAPT: Original attribute defined here.
project/node_modules/react-native-camera/android/build/intermediates/bundles/debug/res/values/values.xml:20:5-26:13: AAPT: String types not allowed (at 'aspectRatio' with value '4:3').
warning: string 'title_payment_failed' has no default translation.
Failed to generate resource table for split ''
project/android/app/build/intermediates/res/merged/debug/values/values.xml:477: error: Attribute "aspectRatio" already defined with incompatible format.
project/android/app/build/intermediates/res/merged/debug/values/values.xml:462: Original attribute defined here.
project/HGC-datacomm/android/app/build/intermediates/res/merged/debug/values/values.xml:3636: error: Error: String types not allowed (at 'aspectRatio' with value '4:3').
> Task :app:processDebugResources FAILED
Failed to execute aapt
com.android.ide.common.process.ProcessException: Failed to execute aapt
thanks in advance
PS. i'm already set android.enableAapt2 into false
edit : i've found how to reproduce this error
compile ('com.midtrans:uikit:1.20.3-PRODUCTION')
compile ('com.midtrans:uikit:1.20.3')
compile project(':react-native-camera')
// midtrans repositories
maven { url "http://dl.bintray.com/pt-midtrans/maven" }
maven { url "https://jitpack.io" }
im suspecting there is a conflict about the dependencies,because when im comment one of the package its working without an issue but i don't know how to solve it. perhaps veteran android can help me how to solve it ?
thanks in advance
I have tried to use Xamarin Android Facebook Component to native login to Facebook. but I get these two errorrs:
No resource identifier found for attribute 'cardElevation' in package 'com.facebook.samples.audiencenetwork'
No resource identifier found for attribute 'cardBackgroundColor' in package 'com.facebook.samples.audiencenetwork'
Would you please tell me how to solve it?
I found the problem.
1- do not install the SDK as a component
2- Add these DLLs: Xamarin .Support .v4
Xamarin .Support.v7 .CardView
Xamarin .Support .v7 .AppCompat
Xamarin .Facebook
And it will work
I imported an Android project into my eclipse workspace, but I get getting the following errors. I have googled for a resolution but have not found one. Please can anyone point me in the right direction? Thank you in advance!
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:5: error: Attribute "mapType" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:12: error: Attribute "cameraBearing" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:13: error: Attribute "cameraTargetLat" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:14: error: Attribute "cameraTargetLng" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:15: error: Attribute "cameraTilt" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:16: error: Attribute "cameraZoom" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:17: error: Attribute "uiCompass" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:18: error: Attribute "uiRotateGestures" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:19: error: Attribute "uiScrollGestures" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:20: error: Attribute "uiTiltGestures" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:21: error: Attribute "uiZoomControls" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:22: error: Attribute "uiZoomGestures" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:23: error: Attribute "useViewLifecycle" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:24: error: Attribute "zOrderOnTop" has already been defined
EDIT
This is my Android project properties:
You are importing the google-playservices` library twice - and two different versions (one is labeled "froyo" on your screen shot).
Probably delete the old one and it will be fine. But the issue is that you cannot have resources defined twice and differently. Sometimes you can have the some one twice and defined the same and sometimes the build will not detect duplicates in Eclipse.
Get rid of one of the two editions of google-play-services that you have in your project libraries list.