当前位置: 首页 > 知识库问答 >
问题:

Xamarin表单-如何修复破损的构建?(好像FormsMap把它弄坏了)

钱华晖
2023-03-14

感谢任何建议

尝试安装当前版本的xamarin.forms.map:2.3.3.180

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets (_GenerateJavaStubs target) ->
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:  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.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; Second Type: 'Android.Support.V4.OS.CancellationSignal+IOnCancelListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:  warning : References to the type 'Android.Support.V4.OS.CancellationSignal.IOnCancelListenerImplementor' will refer to 'Android.Support.V4.OS.CancellationSignal+IOnCancelListenerImplementor, Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:  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.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; Second Type: 'Android.Support.V4.View.ActionProvider+ISubUiVisibilityListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:  warning : References to the type 'Android.Support.V4.View.ActionProvider.ISubUiVisibilityListenerImplementor' will refer to 'Android.Support.V4.View.ActionProvider+ISubUiVisibilityListenerImplementor, Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:  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.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; Second Type: 'Android.Support.V4.View.ActionProvider+IVisibilityListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:  warning : References to the type 'Android.Support.V4.View.ActionProvider.IVisibilityListenerImplementor' will refer to 'Android.Support.V4.View.ActionProvider+IVisibilityListenerImplementor, Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:  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.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; Second Type: 'Android.Support.V4.View.IOnApplyWindowInsetsListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:  warning : References to the type 'Android.Support.V4.View.IOnApplyWindowInsetsListenerImplementor' will refer to 'Android.Support.V4.View.IOnApplyWindowInsetsListenerImplementor, Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:  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.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; Second Type: 'Android.Support.V4.View.IViewPropertyAnimatorListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:  warning : References to the type 'Android.Support.V4.View.IViewPropertyAnimatorListenerImplementor' will refer to 'Android.Support.V4.View.IViewPropertyAnimatorListenerImplementor, Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:  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.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; Second Type: 'Android.Support.V4.View.IViewPropertyAnimatorUpdateListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:  warning : References to the type 'Android.Support.V4.View.IViewPropertyAnimatorUpdateListenerImplementor' will refer to 'Android.Support.V4.View.IViewPropertyAnimatorUpdateListenerImplementor, Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:  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.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; Second Type: 'Android.Support.V4.View.MenuItemCompat+IOnActionExpandListenerImplementor, Xamarin.Android.Support.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:  warning : References to the type 'Android.Support.V4.View.MenuItemCompat.IOnActionExpandListenerImplementor' will refer to 'Android.Support.V4.View.MenuItemCompat+IOnActionExpandListenerImplementor, Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

Errors:

/Users/TESTProjects/TEST/Droid/TEST.Droid.csproj (Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets (_CompileJava target) ->
    obj/Debug/android/src/mono/android/support/v4/app/SharedElementCallback_OnSharedElementsReadyListenerImplementor.java(8,47):  javacerror :  error: cannot find symbol

android.support.v4.app.SharedElementCallback.OnSharedElementsReadyListener
  symbol:   class OnSharedElementsReadyListener
  location: class SharedElementCallback


obj/Debug/android/src/mono/android/support/v4/view/accessibility/AccessibilityManagerCompat_AccessibilityStateChangeListenerImplementor.java(8,67):  javacerror :  error: cannot find symbol
        android.support.v4.view.accessibility.AccessibilityManagerCompat.AccessibilityStateChangeListener
  symbol:   class AccessibilityStateChangeListener
  location: class AccessibilityManagerCompat


obj/Debug/android/src/mono/android/support/v4/view/accessibility/AccessibilityManagerCompat_TouchExplorationStateChangeListenerImplementor.java(8,67):  javacerror :  error: cannot find symbol
        android.support.v4.view.accessibility.AccessibilityManagerCompat.TouchExplorationStateChangeListener
  symbol:   class TouchExplorationStateChangeListener
  location: class AccessibilityManagerCompat


obj/Debug/android/src/mono/android/support/v4/widget/SearchViewCompat_OnCloseListenerImplementor.java(8,45):  javacerror :  error: cannot find symbol
        android.support.v4.widget.SearchViewCompat.OnCloseListener
  symbol:   class OnCloseListener
  location: class SearchViewCompat

obj/Debug/android/src/mono/android/support/v4/widget/SearchViewCompat_OnQueryTextListenerImplementor.java(8,45): error :  error: cannot find symbol
        android.support.v4.widget.SearchViewCompat.OnQueryTextListener
  symbol:   class OnQueryTextListener
  location: class SearchViewCompat

共有1个答案

乐刚毅
2023-03-14

我今天遇到了同样的问题,它似乎与来自两个C#项目的两个不同的依赖关系有关,其中一个被另一个使用/引用。从我所看到的情况来看,可能安装了相同依赖项的两个不同版本。最有可能的是,您可能需要合并您的NuGet包。这可能是错误消息试图表达的意思。重复类型之一是Android.support.v4.view.iviewPropertyAnimatorListenerimplementor,它包含在xamarin.Android.support.v4和xamarin.Android.support.compat两个库中。至少对于我的解决方案来说,这是由于xamarin.android.support.v4 NuGet包的两个不同版本,即25.3.1和23.3.0版本。由于Xamarin.Forms NuGet包的依赖性,我必须显式地降级到23.3.0版本,这似乎解决了这个问题。

 类似资料:
  • 昨天我使用Xampp创建了一些简单的基于Web的实用工具。今天我想继续工作,但xampp控制面板给了我一些错误。 这是MySQL错误日志: 已经尝试过修复,但mySQL服务甚至无法启动,所以我有点无助。。。

  • 问题内容: 我正在使用apache commons http客户端使用post方法来调用url来发布参数,并且很少抛出以下错误。 有人可以建议导致此异常的原因以及如何对其进行调试吗? 问题答案: 原因是: 最通常的是,在另一端已经关闭连接时写入连接; 通常,对等方关闭连接而不读取其末端已经挂起的所有数据。 因此,在两种情况下,你的应用程序协议定义或实施都不充分。 还有第三个原因,我在这里不做记录,

  • 1998年12月25日晚上(我的计算机时钟绝对准确),在进行完日常的一系列操作后,又准备对系统进行一下“挖潜”工作,我相信这是大多数PC 发烧友的共同爱好。主板的BIOS已经被升级过好几次了,而且目前我还没找到更新的BIOS升级数据文件,所以我把目光转向了主板附带光盘上的DMI(Desktop Management Interface,桌面管理接口)程序。DMI为用户提供了一个与系统硬件直接对话的

  • 问题内容: 在更新OSx并安装我的环境的新版本后,我彻底无法解决它。我不确定是什么原因导致的,并列出了我所做的并且最初阅读 无效的 一整套内容。答案部分提供了解决我的问题的方法。 无法修复未找到的命令的原因: 通过自制软件安装python,然后使用pip安装virtualenv 通过https://www.python.org安装python ,然后使用pip安装virtualenv 相关问题对我

  • 在OSx更新并安装了新版本的python 2.7之后,我的环境完全崩溃了,我很难修复它。我不确定是什么原因造成的,我经历了一整套我做过的事情,最初读到的那些不起作用的东西列在下面。答案部分提供了解决问题的方法。 通过家酿安装python,然后用pip安装viralenv 通过https://www.python.org安装了python,然后用pip安装虚拟环境 帮助了我,但没有解决我的问题的相关

  • 问题内容: 我正在修复一些错误的UTF-8编码。我目前正在使用PHP 5和MySQL。 在我的数据库中,我有一些编码错误的实例,例如:ƒ 数据库整理是utf8_general_ci PHP使用的是正确的UTF-8标头 Notepad ++设置为使用不带BOM的UTF-8 数据库管理在phpMyAdmin中处理 并非所有重音符号的情况都被破坏 我需要某种函数来帮助我将ƒ,®,?,?¼和其他类似的实例