TobiasBuchholz / Plugin.Firebase

Wrapper around the native Android and iOS Firebase Xamarin SDKs
MIT License
211 stars 49 forks source link

Plugin.Firebase.Android could not be resolved #138

Closed sej69 closed 10 months ago

sej69 commented 1 year ago

I see there is one for iOS but I'm not sure it's referencing the same type of issue I'm experiencing on a new .net Maui project.

In my MauiProgram.cs file I am able to add "Using Plugin.Firebase.Android", .Android shows up on the code helper but with a warning triangle on it. When I look closer at it, it says that it's available. When selected, I get the CS0234: the type or namespace name 'Android' does not exist in the namespace 'Plugin.Firebase' ...

This is a .net7 Maui project. I did back it down to .net6 and got the same error (and more as a lot of the errors were referencing package errors).

andyzukunft commented 1 year ago

I had this and other similar issues trying to add the Nuget. On closer inspection (at least on later attempts) I got an error message trying to add the package (either using the .csproj or Nuget Package manager). What helped me was adding the nuget package via dotnet cli using the Developer PowerShell in Visual Studio.

Example: dotnet add package Plugin.Firebase --version 1.3.0

sej69 commented 1 year ago

I can't get that to work for me; I've still got that error. Sadly, I've got that error now with the iOS version of the plugin too:

using Plugin.Firebase.Bundled.Platforms.iOS;

TobiasBuchholz commented 1 year ago

Please provide an example project so I can look into it. Also what OS and Visual Studio version are you using?

sej69 commented 1 year ago

I'll work on building a sample project, I can't send up the project I'm working with.

I'm on Win 11, VS2022 - 17.4.3

sej69 commented 1 year ago

I just discovered that there is an "example" package out there as part of the source for this project. It appears to be using old libraries, is it possible to update the example? There's a lot of code in there that is not present on your page here: https://github.com/TobiasBuchholz/Plugin.Firebase#net-maui-support

TobiasBuchholz commented 1 year ago

What "example" package do you mean? The sample project in the repo is up-to-date. I've also updated the readme files since some contained small mistakes.

sej69 commented 1 year ago

I re-downloaded the library with the samples in it. It is showing 24 packages out of date but it's not showing the compile errors I was seeing the first time around? I'll work off of this to see if I can get the notification working; there's a lot more here that's not in the sample. Thanks!

TobiasBuchholz commented 10 months ago

Since I haven't heard from you in more than 30 days, I hope this issue is no longer affecting you. If it is, please reopen this issue and provide the more information so that I can look into it further. Thank you!