Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] [Android] Upgrading 5.0.0.2578 to 5.0.0.2612 error XA4212 #15817

Closed
GUOLDEV opened this issue Sep 13, 2023 · 3 comments
Closed

[Bug] [Android] Upgrading 5.0.0.2578 to 5.0.0.2612 error XA4212 #15817

GUOLDEV opened this issue Sep 13, 2023 · 3 comments

Comments

@GUOLDEV
Copy link

GUOLDEV commented Sep 13, 2023

Description

Error error XA4212: Type AndroidX.MediaRouter.App.MediaRouteDynamicControllerDialog implements Android.Runtime.IJavaObject but does not inherit Java.Lang.Object or Java.Lang.Throwable. This is not supported.
Error error XA4212: Type AndroidX.MediaRouter.App.MediaRouteChooserDialog implements Android.Runtime.IJavaObject but does not inherit Java.Lang.Object or Java.Lang.Throwable. This is not supported.
Error error XA4212: Type AndroidX.AppCompat.App.AppCompatDialog implements Android.Runtime.IJavaObject but does not inherit Java.Lang.Object or Java.Lang.Throwable. This is not supported.
Error error XA4212: Type AndroidX.MediaRouter.App.MediaRouteDynamicChooserDialog implements Android.Runtime.IJavaObject but does not inherit Java.Lang.Object or Java.Lang.Throwable. This is not supported.
Error error XA4212: Type AndroidX.MediaRouter.App.MediaRouteControllerDialog implements Android.Runtime.IJavaObject but does not inherit Java.Lang.Object or Java.Lang.Throwable. This is not supported.
Error error XA4212: Type Google.Android.Material.BottomSheet.BottomSheetDialog implements Android.Runtime.IJavaObject but does not inherit Java.Lang.Object or Java.Lang.Throwable. This is not supported.
Error error XA4212: Type AndroidX.AppCompat.App.AlertDialog implements Android.Runtime.IJavaObject but does not inherit Java.Lang.Object or Java.Lang.Throwable. This is not supported.

Basic Information

  • Version with issue: 5.0.0.2612
  • Last known good version: 5.0.0.2578
  • Platform Target Frameworks:
    • iOS:
    • Android: 13
    • UWP:
  • Android Support Library / AndroidX Version:
  • NuGet Packages:
  • Affected Devices:

Environment

Microsoft Visual Studio Professional 2022
Version 17.7.4
VisualStudio.17.Release/17.7.4+34031.279
Microsoft .NET Framework
Version 4.8.04084

Installed Version: Professional

ASP.NET and Web Tools 17.7.273.65229
ASP.NET and Web Tools

Azure App Service Tools v3.0.0 17.7.273.65229
Azure App Service Tools v3.0.0

Azure Functions and Web Jobs Tools 17.7.273.65229
Azure Functions and Web Jobs Tools

C# Tools 4.7.0-3.23416.8+43b0b05cc4f492fd5de00f6f6717409091df8daa
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Conveyor by Keyoti 1.0
Allows you to access your web applications from other machines, even if hosted on the development web server.

Extensibility Message Bus 1.4.34 (main@d5ab18b)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Mono Debugging for Visual Studio 17.7.27 (547ea6f)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 6.7.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Razor (ASP.NET Core) 17.7.3.2333001+0ab18affdf2a37647768d0e25f5f021bee6257a1
Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools 17.7.10.1
Microsoft SQL Server Data Tools

StylerPackage Extension 1.0
StylerPackage Visual Stuido Extension Detailed Info

TypeScript Tools 17.0.20829.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 4.7.0-3.23416.8+43b0b05cc4f492fd5de00f6f6717409091df8daa
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 17.7.0-beta.23314.10+e612cf93b989503c89e3a5830090062b7ab5e143
Microsoft Visual F# Tools

Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.

VisualStudio.DeviceLog 1.0
Information about my package

VisualStudio.Mac 1.0
Mac Extension for Visual Studio

VSPackage Extension 1.0
VSPackage Visual Studio Extension Detailed Info

Xamarin 17.7.0.216 (d17-7@133ddef)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 17.7.3.9 (remotes/origin/d17-7@796d191def)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates 17.7.21 (150ec9f)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK 13.2.1.2 (d17-5/a8a26c7)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: d9a6e87
Java.Interop: xamarin/java.interop/d17-5@149d70fe
SQLite: xamarin/sqlite@68c69d8
Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-5@ca1552d

Xamarin.iOS and Xamarin.Mac SDK 16.4.0.15 (8c3876d5e)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

@GUOLDEV GUOLDEV added s/unverified New report that has yet to be verified t/bug 🐛 labels Sep 13, 2023
@GUOLDEV GUOLDEV changed the title [Bug] [Android] [Regression] Upgrading 5.0.0.2578 to 5.0.0.2612 Type [Package] implements Android.Runtime.IJavaObject but does not inherit Java.Lang.Object or Java.Lang.Throwable. This is not supported. [Bug] [Android] [Regression] Upgrading 5.0.0.2578 to 5.0.0.2612 error XA4212 Sep 13, 2023
@jfversluis
Copy link
Member

Make sure to update all your dependencies and do a good clean and rebuild, also target Android 13 as is outlined here.

@jfversluis jfversluis added p/Android and removed s/unverified New report that has yet to be verified labels Sep 14, 2023
@jfversluis jfversluis changed the title [Bug] [Android] [Regression] Upgrading 5.0.0.2578 to 5.0.0.2612 error XA4212 [Bug] [Android] Upgrading 5.0.0.2578 to 5.0.0.2612 error XA4212 Sep 14, 2023
@jfversluis
Copy link
Member

No response for 3 weeks so assuming that was it 😄

@MagicAndre1981
Copy link
Contributor

MagicAndre1981 commented Oct 16, 2023

I get similar issue after updating some AndroidX packages:

error XA4212: Type AndroidX.DataBinding.ObservableArrayMap implements Android.Runtime.IJavaObject but does not inherit Java.Lang.Object or Java.Lang.Throwable. This is not supported.

and I "solved" it by adding this to my .csproj:

<PropertyGroup>
    <AndroidErrorOnCustomJavaObject>false</AndroidErrorOnCustomJavaObject>
</PropertyGroup>

By default this value is true and triggers the error. Maybe he also found this workaround @jfversluis

And I also get warnings about version outside of dependency constraint again:

NU1608: Detected package version outside of dependency constraint: Xamarin.Forms 5.0.0.2612 requires Xamarin.AndroidX.Lifecycle.LiveData (>= 2.3.1.1 && <= 2.6.1.1) but version Xamarin.AndroidX.Lifecycle.LiveData 2.6.2.1 was resolved.
NU1608: Detected package version outside of dependency constraint: Xamarin.Forms 5.0.0.2612 requires Xamarin.Google.Android.Material (>= 1.4.0.2 && < 1.9.0) but version Xamarin.Google.Android.Material 1.10.0 was resolved.
NU1608: Detected package version outside of dependency constraint: Xamarin.Forms 5.0.0.2612 requires Xamarin.AndroidX.Browser (>= 1.3.0.6 && < 1.6.0) but version Xamarin.AndroidX.Browser 1.6.0.1 was resolved.
NU1608: Detected package version outside of dependency constraint: Xamarin.Forms 5.0.0.2612 requires Xamarin.AndroidX.Navigation.UI (>= 2.3.5.1 && < 2.6.0) but version Xamarin.AndroidX.Navigation.UI 2.7.4 was resolved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants