Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Adding Xamarin.Forms breaks references #75

@TimBo93

Description

@TimBo93

Xamarin.Android Version (eg: 6.0):

8.0 (Oreo)

Operating System & Version (eg: Mac OSX 10.11):

Windows 10 1709

Support Libraries Version (eg: 23.3.0):

Android 5.0 (API Level 21 - Lollipop)

Describe your Issue:

To implement SSO with IndentityServer i am trying to use ChromeCustomTabs as described here:
IdentityModel/IdentityModel.OidcClient.Samples

Now i want to add Xamarin.Forms support.

Steps to Reproduce (with link to sample solution if possible):

Install Xamarin.Forms Nuget with Version

<ItemGroup>
 <PackageReference Include="IdentityModel.OidcClient">
   <Version>2.3.0</Version>
 </PackageReference>
 <PackageReference Include="Xamarin.Android.Support.CustomTabs">
   <Version>26.1.0.1</Version>
 </PackageReference>
 <PackageReference Include="Xamarin.Forms">
   <Version>2.4.0.38779</Version>
 </PackageReference>
</ItemGroup>

Include any relevant Exception Stack traces, build logs, adb logs:

1>------ Build started: Project: AndroidClient, Configuration: Debug Any CPU ------
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2041,5): warning MSB3277: Found conflicts between different versions of "Microsoft.CSharp" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
1>C:\AndroidClientVS2017\AndroidClient\MainActivity.cs(48,33,48,56): warning CS0618: 'OidcClient.LoginAsync(DisplayMode, int, object)' is obsolete: 'This method will be removed in a future version. Please change your code to use LoginRequest'
1>  AndroidClient -> C:\AndroidClientVS2017\AndroidClient\bin\Debug\AndroidClient.dll
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1500,2): warning : Ignoring C:\Users\tborowski\.nuget\packages\system.runtime.compilerservices.unsafe\4.4.0\ref\netstandard2.0 as it is a Reference Assembly
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1794,3): warning : Duplicate managed type found! Mappings between managed types and Java types must be unique. First Type: 'Android.Support.V4.OS.CancellationSignal+IOnCancelListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; Second Type: 'Android.Support.V4.OS.CancellationSignal+IOnCancelListenerImplementor, Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1794,3): warning : References to the type 'Android.Support.V4.OS.CancellationSignal.IOnCancelListenerImplementor' will refer to 'Android.Support.V4.OS.CancellationSignal+IOnCancelListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1794,3): warning : Duplicate managed type found! Mappings between managed types and Java types must be unique. First Type: 'Android.Support.V4.View.ActionProvider+ISubUiVisibilityListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; Second Type: 'Android.Support.V4.View.ActionProvider+ISubUiVisibilityListenerImplementor, Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1794,3): warning : References to the type 'Android.Support.V4.View.ActionProvider.ISubUiVisibilityListenerImplementor' will refer to 'Android.Support.V4.View.ActionProvider+ISubUiVisibilityListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1794,3): warning : Duplicate managed type found! Mappings between managed types and Java types must be unique. First Type: 'Android.Support.V4.View.ActionProvider+IVisibilityListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; Second Type: 'Android.Support.V4.View.ActionProvider+IVisibilityListenerImplementor, Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1794,3): warning : References to the type 'Android.Support.V4.View.ActionProvider.IVisibilityListenerImplementor' will refer to 'Android.Support.V4.View.ActionProvider+IVisibilityListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1794,3): warning : Duplicate managed type found! Mappings between managed types and Java types must be unique. First Type: 'Android.Support.V4.View.IOnApplyWindowInsetsListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; Second Type: 'Android.Support.V4.View.IOnApplyWindowInsetsListenerImplementor, Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1794,3): warning : References to the type 'Android.Support.V4.View.IOnApplyWindowInsetsListenerImplementor' will refer to 'Android.Support.V4.View.IOnApplyWindowInsetsListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1794,3): warning : Duplicate managed type found! Mappings between managed types and Java types must be unique. First Type: 'Android.Support.V4.View.IViewPropertyAnimatorListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; Second Type: 'Android.Support.V4.View.IViewPropertyAnimatorListenerImplementor, Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1794,3): warning : References to the type 'Android.Support.V4.View.IViewPropertyAnimatorListenerImplementor' will refer to 'Android.Support.V4.View.IViewPropertyAnimatorListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1794,3): warning : Duplicate managed type found! Mappings between managed types and Java types must be unique. First Type: 'Android.Support.V4.View.IViewPropertyAnimatorUpdateListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; Second Type: 'Android.Support.V4.View.IViewPropertyAnimatorUpdateListenerImplementor, Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1794,3): warning : References to the type 'Android.Support.V4.View.IViewPropertyAnimatorUpdateListenerImplementor' will refer to 'Android.Support.V4.View.IViewPropertyAnimatorUpdateListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1794,3): warning : Duplicate managed type found! Mappings between managed types and Java types must be unique. First Type: 'Android.Support.V4.View.MenuItemCompat+IOnActionExpandListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; Second Type: 'Android.Support.V4.View.MenuItemCompat+IOnActionExpandListenerImplementor, Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1794,3): warning : References to the type 'Android.Support.V4.View.MenuItemCompat.IOnActionExpandListenerImplementor' will refer to 'Android.Support.V4.View.MenuItemCompat+IOnActionExpandListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
1>  Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat;
1>  Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompat;
1>  Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompat$1;
1>  Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompat$OnRequestPermissionsResultCallback;
1>  Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompat$SharedElementCallback21Impl;
1>  Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityManagerCompat;
1>  Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityOptionsCompat;
1>  Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/AppOpsManagerCompat;
1>  Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/BundleCompat;
1>  
1>  UNEXPECTED TOP-LEVEL EXCEPTION:
1>  java.lang.RuntimeException: Translation has been interrupted
1>  	at com.android.dx.command.dexer.Main.processAllFiles(Main.java:615)
1>  	at com.android.dx.command.dexer.Main.runMonoDex(Main.java:313)
1>  	at com.android.dx.command.dexer.Main.runDx(Main.java:291)
1>  	at com.android.dx.command.dexer.Main.main(Main.java:247)
1>  	at com.android.dx.command.Main.main(Main.java:94)
1>  Caused by: java.lang.InterruptedException: Too many errors
1>  	at com.android.dx.command.dexer.Main.processAllFiles(Main.java:607)
1>  	... 4 more
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2096,3): error : java.lang.IllegalArgumentException: already added :  Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat;
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

I remove /bin /obj restored nuget and restarted vs.
It seems to be that some references are broken with the current (stable) Xamarin.Forms Package.

Kind Regard
Tim

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy