jamesmontemagno / InAppBillingPlugin

Cross-platform In App Billing Plugin for .NET
MIT License
636 stars 152 forks source link

Compiling errors since lib update (from 4.0.2 to 6.7.0) #522

Closed gorbat-o closed 1 year ago

gorbat-o commented 1 year ago

Bug Information

Version Number of Plugin: 6.7.0 and all versions in between 4.* and 6.7.0 Device Tested On: MacOS Simulator Tested On: None Version of VS: 17.4.3 (Build 21) Version of Xamarin: 5.0.0.2545 Versions of other things you are using:

Steps to reproduce the Behavior

Not sure. I updated this library because Google Play Store gave me an error. image

Expected Behavior

Build.

Actual Behavior

Failing to build.

https://gist.github.com/gorbat-o/6ea23b43fd64762b057e6c04f923e041

Code snippet

None needed.

Screenshot

None needed.

jamesmontemagno commented 1 year ago

Did you change your compilation settings to compile against the latest version of Android

gorbat-o commented 1 year ago

I think I am compiling against the latest version of Android

AndroidManifest.xml

image

Android Project Configuration in Build -> General

image
gorbat-o commented 1 year ago

Test.zip i was able to reproduce this issue here

pulmuone commented 1 year ago

Test.zip i was able to reproduce this issue here

Xamarin.Android.Google.BillingClient version 5.1.0 in Plugin.InAppBilling causes an error. Please use Xamarin.Android.Google.BillingClient version 4.0.0. Good Luck~!.

gorbat-o commented 1 year ago

I just tested and it still doesn't compile but I am guessing it's a different issue.

https://gist.github.com/gorbat-o/3d62b6bbf51955f9be2a83a47de371e9

pulmuone commented 1 year ago

I just tested and it still doesn't compile but I am guessing it's a different issue.

https://gist.github.com/gorbat-o/3d62b6bbf51955f9be2a83a47de371e9

There is a problem with FirebaseDatabase.net in nuget you are using.

jamesmontemagno commented 1 year ago

I currently target version 4.0.0 of the google play billing, so that should be brought in automatically.

Keep it simple.. if you only have these nugets

  <ItemGroup>
    <PackageReference Include="Xamarin.Forms" Version="5.0.0.2545" />  
    <PackageReference Include="Xamarin.Essentials" Version="1.7.4" />
    <PackageReference Include="Plugin.InAppBilling" Version="6.7.0" />
  </ItemGroup>

works fine.

There is probably some conflict in your dependencies as you have a lot of libraries there. Seems like the firebase ones have some issue.. I removed everything except for

  <ItemGroup>
    <PackageReference Include="Xamarin.Forms" Version="5.0.0.2545" />  
    <PackageReference Include="Xamarin.Essentials" Version="1.7.4" />
    <PackageReference Include="FirebaseDatabase.net" Version="4.1.0" />
    <PackageReference Include="FirebaseStorage.net" Version="1.0.3" />
    <PackageReference Include="LiteDB" Version="5.0.15" />
  </ItemGroup>

This wont compile either, so nothing to do with my library

gorbat-o commented 1 year ago

Thank you for the help! the compiler is showing unrelated errors :/