Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Xamarin Forms Android Project Build Failed

OnurAhmetKarahanlıOnurAhmetKarahanlı USMember ✭✭
edited June 25 in Xamarin.Forms

Hi, i try to build my xamarin.forms android project but i got some errors.
Can any one help me?

Xamarin Forms Version: 4.7.0.968
Compile version : Android 9
My Target framework : Android 9
Minumun Android version : Android 6
Dex compiler : d8
Code shrinker : none
Aot compilation : none
Linking : none

Severity Code Description Project File Line Suppression State
Error The Java type mono.android.support.v4.media.session.MediaSessionCompat_OnActiveChangeListenerImplementor is generated by more than one managed type. Please change the [Register] attribute so that the same Java type is not emitted. Mobile.App.Android
Severity Code Description Project File Line Suppression State

Error mono.android.support.v4.media.session.MediaSessionCompat_OnActiveChangeListenerImplementor generated by: Android.Support.V4.Media.Session.MediaSessionCompat+IOnActiveChangeListenerImplementor, Xamarin.AndroidX.Media, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Mobile.App.Android

Severity Code Description Project File Line Suppression State
Error mono.android.support.v4.media.session.MediaSessionCompat_OnActiveChangeListenerImplementor generated by: Android.Support.V4.Media.Session.MediaSessionCompat+IOnActiveChangeListenerImplementor, Xamarin.Android.Support.Media.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null SKI.CrossPlatForm.Mobile.App.Android

Answers

  • jezhjezh Member, Xamarin Team Xamurai

    Did this problem exist before? If it was normal before, and now something goes wrong, you can try to delete bin and obj folders, then restart VS and try again .

    I did a test, but I couldn't reproduce this question ,could you please post a basic demo so that we can try to reproduce this question on our side?

  • OnurAhmetKarahanlıOnurAhmetKarahanlı USMember ✭✭

    Hi,
    i pass the error. i erase old android support nuget packeges. i convert it anroidx project but i have got a new errors.
    My app integrated to firebase messaging system. I upgrade firebase nuget package but the error is still there.

    Severity Code Description Project File Line Suppression State
    Error CS7069 Reference to type 'Zzb' claims it is defined in 'Xamarin.Firebase.Iid', but it could not be found SKI.CrossPlatForm.Mobile.App.Android D:\Tempest.TFS.Code\Xam\SKI.CrossPlatForm.Mobile.App\SKI.CrossPlatForm.Mobile.App.Android\FireBaseIntegration.cs 14 Active

  • jezhjezh Member, Xamarin Team Xamurai

    Severity Code Description Project File Line Suppression State
    Error CS7069 Reference to type 'Zzb' claims it is defined in 'Xamarin.Firebase.Iid', but it could not be found SKI.CrossPlatForm.Mobile.App.Android D:\Tempest.TFS.Code\Xam\SKI.CrossPlatForm.Mobile.App\SKI.CrossPlatForm.Mobile.App.Android\FireBaseIntegration.cs 14 Active

    According to the log you posted, it seems that you haven't installed the necessary nuget Xamarin.Firebase.Iid in your app .

    You can recheck it.
    If the problem persists, could you please post a basic demo so that we can try to test on our side?

  • jezhjezh Member, Xamarin Team Xamurai

    Hi @OnurAhmetKarahanlı, have you resolved your question?

  • OnurAhmetKarahanlıOnurAhmetKarahanlı USMember ✭✭

    Hi Xamarin.Firebase.Iid is already installed my app.
    I upgrade all my nuget package also i installed pre-release version.(Last version of firebase package how some errors).
    I change cs.proj referans manuel and i change My Target framework to Android 10.(10.99 i get some errors.)
    I take a lot of error but solve it one by one.
    Most of the errors are about migrate androidx firebase.

  • jezhjezh Member, Xamarin Team Xamurai

    Wow, that's amazing!
    Congrats, and could you please mark this thread to finish this topic? Thanks in advance. :)

Sign In or Register to comment.