Rg.plugins.popup: After update to 2.0.0.1: Cannot init in Android project

Created on 9 Apr 2020  路  12Comments  路  Source: rotorgames/Rg.Plugins.Popup

馃悰 Bug Report


Compiler cannot find Popup.Init()in the OnCreate in MainActivity

 Rg.Plugins.Popup.Popup.Init(this, savedInstanceState);

Expected behavior

That it should compile...

Reproduction steps

Just upgrading from version: 1.2.0.223

Configuration

Version: 2.0.0.1

Platform:

  • [ ] :iphone: iOS
  • [ ] :robot: Android
  • [ ] :checkered_flag: WPF
  • [ ] :earth_americas: UWP
  • [ ] :apple: MacOS
  • [ ] :tv: tvOS
  • [X] :monkey: Xamarin.Forms

Most helpful comment

You should update to Android 10 anyways, and keep up to date. The Android 9 support is a workaround for now ;)

All 12 comments

Same Issue after the upgrade

Same Issue after the upgrade

You can either update to android 10 sdk or wait for the next release which adds support for android 9 sdk.

You should update to Android 10 anyways, and keep up to date. The Android 9 support is a workaround for now ;)

You should update to Android 10 anyways, and keep up to date. The Android 9 support is a workaround for now ;)

I appreciate this.
I have got an idea! We can put the obsolete attribute on top of the Init method only for android 9 sdk build and as a message, we can say this method will be removed from the next release of Rg.Plugins.Popup (for example 2.1), so people can understand what's going on.
Note that even with VS 16.6 prev 2, Xamarin projects are being created with android 9 sdk! So at least we should provide people a hint. Not all people have an understanding of android sdks, androidX and other stuff.

Well, I hadn't updated the target of the Android project to 10... Will try to update again :-)

So for version 2.0.1 I should _not_ initiate it? Also for iOS? I think the documentation needs to be updated to reflect this (or I looked in the wrong places?)

Arghhh.... Setting target to Android 10 now suddenly breaks a customrenderer for tabs at the bottom of the page.... sigh! All those gifts you get! _(wasting your time so you cannot do what you were working on!)_

Right, so perhaps the update will be another day - if a quick attempt doesn't solve it

... just for completeness, then it turned out that the customrenderer was choking on something else (with no pointers...). So the updating the target to Android 10 in itself did not course the problem. So I have updated - and updated all NuGet packages - including this one - and everything works....

I also see that we are now on version 2.0.0.2 :-) - perhaps that also solves the issue with the reference that could not compile? :-)

... just for completeness, then it turned out that the customrenderer was choking on something else (with no pointers...). So the updating the target to Android 10 in itself did not course the problem. So I have updated - and updated all NuGet packages - including this one - and everything works....

I also see that we are now on version 2.0.0.2 :-) - perhaps that also solves the issue with the reference that could not compile? :-)

The latest version of the nuget package is compatible with version 9, but you've selected the better option by targeting Android 10. It's something like dotnet versions, for example a dotnet 3.1 app can use libraries which are built against dotnet 2. But the dotnet 2 app can't use libraries which are built against dotnet 3.1
So, by selecting highest version of the sdk, you can be sure that you've access to latest cool features. It means Android sdk version 10 and dotnet core 3.1 for dotnet core as an example.

... well, I didn't have to do anything about the init. Is that working as designed? Should I remove the init code?

@john-dalsgaard You have to use the init method anyway. You can't see the init method because the plugin has been compiled for Android 10. To be honest, I don't like this solution.

Ok, so all is good in the way I use it. Thanks!

Same Issue after the upgrade

You can either update to android 10 sdk or wait for the next release which adds support for android 9 sdk.

Thank you..

Was this page helpful?
0 / 5 - 0 ratings

Related issues

luis-barreira picture luis-barreira  路  5Comments

Nessitro picture Nessitro  路  5Comments

YZahringer picture YZahringer  路  4Comments

mshenoy83 picture mshenoy83  路  4Comments

widiarifki picture widiarifki  路  5Comments