-
Notifications
You must be signed in to change notification settings - Fork 147
Xamarin.Google.Android.Play.Core can't implement IInstallStateUpdatedListener #673
Comments
Looks like the same problem in this other repo. Should be a good clue. |
Can we please have a fix for this? |
Automagically closed by Please open new issue if problem persists! And report if fix works too. |
This one seems to still be an issue. App fails building if I try implementing public class AppUpdateInstallStateListener: Object, IInstallStateUpdatedListener
{
private readonly Action<InstallState> _onStateUpdate;
public AppUpdateInstallStateListener(Action<InstallState> onStateUpdate)
{
_onStateUpdate = onStateUpdate;
}
public void OnStateUpdate(Object p0)
{
if (p0 is InstallState installState)
_onStateUpdate.Invoke(installState);
}
} Build error:
The generated code looks like: package crc64ff75450e0e434054;
public class AppUpdateInstallStateListener
extends java.lang.Object
implements
mono.android.IGCUserPeer,
com.google.android.play.core.install.InstallStateUpdatedListener,
com.google.android.play.core.listener.StateUpdatedListener
{
/** @hide */
public static final String __md_methods;
static {
__md_methods =
"n_onStateUpdate:(Ljava/lang/Object;)V:GetOnStateUpdate_Ljava_lang_Object_Handler:Xamarin.Google.Android.Play.Core.Listener.IStateUpdatedListenerInvoker, Xamarin.Google.Android.Play.Core.Common\n" +
"";
mono.android.Runtime.register ("TrackMan.DrivingRangeApp.Droid.Listeners.AppUpdateInstallStateListener, TrackMan.DrivingRangeApp.Droid", AppUpdateInstallStateListener.class, __md_methods);
}
public AppUpdateInstallStateListener ()
{
super ();
if (getClass () == AppUpdateInstallStateListener.class) {
mono.android.TypeManager.Activate ("TrackMan.DrivingRangeApp.Droid.Listeners.AppUpdateInstallStateListener, TrackMan.DrivingRangeApp.Droid", "", this, new java.lang.Object[] { });
}
}
public void onStateUpdate (java.lang.Object p0)
{
n_onStateUpdate (p0);
}
private native void n_onStateUpdate (java.lang.Object p0);
private java.util.ArrayList refList;
public void monodroidAddReference (java.lang.Object obj)
{
if (refList == null)
refList = new java.util.ArrayList ();
refList.add (obj);
}
public void monodroidClearReferences ()
{
if (refList != null)
refList.clear ();
}
} This is with the following packages:
If I then add:
Then I now get:
|
Seems like everything from Play.App.Update and Play.Review was added into Play.Core? |
please open new issue |
I am not API expert and yes google does shuffle stuff around and I am mostly unaware until someone hits issue. |
I ended up removing the Play.App.Update and Play.Review packages and now only use Play.Core then it seems to work fine. At least it builds now. |
same issue |
@pulmuone same issue what? |
} Error warning: unknown enum constant Scope.LIBRARY_GROUP_PREFIX reason: class file for androidx.annotation.RestrictTo$Scope not found error: MainActivity_AppUpdateInstallStateListener is not abstract and does not override abstract method onStateUpdate(InstallState) in StateUpdatedListener Error error: name clash: onStateUpdate(Object) in MainActivity_AppUpdateInstallStateListener and onStateUpdate(InstallState) in StateUpdatedListener have the same erasure, yet neither overrides the other |
And which packages are you using? See my comment here: #673 (comment) |
don't use Play.App.Update and Play.Review Conflict with Plugin.StoreReview. |
Do you really need a plugin for that? It is 2-3 lines per platform to trigger store reivews. |
How did you retrieved generated java code? |
Google Play Services Version
Xamarin.Google.Android.Play.Core 1.10.3.1
Describe your Issue
Relevant information
Packages used:
Minimal Repro Code Sample
Created a new project so only thing in there
Adding abstract makes no difference it just gives these errors then
The text was updated successfully, but these errors were encountered: