Did not find reference matching RestoreAssemblyResources AssemblyName metadata

I am trying to add Xamarin.Firebase.Messaging NuGet package in my existing Xamarin Native project.
After installing this package i started to get the weird error.
I tried uninstalling the package but it didn't work, tried to downgrade it but still not working.
The project is not building successfully. I have already done the trial and error methods for this but it wont work.
Please suggest the solution or workaround for this.
Severity Code Description Project File Line Suppression State
Error Did not find reference matching RestoreAssemblyResources AssemblyName metadata 'Xamarin.Firebase.Crash'

Best Answer

  • pranay99pranay99 ✭✭
    Accepted Answer

    So I found the solution for this problem. I don't know how but there was Mono.Android.dll added in both Portable project and in Droid project, and therefore were the errors. So I just deleted both the dll files and tried building the project, and it worked fine. I guess few nuget packages had error and ended up adding dll files in both the projects.

Answers

  • BillyLiuBillyLiu Member, Xamarin Team Xamurai

    @pranay99

    Please try to clean your project, clean the nuget packeges.
    What's the android version are you using? Please match the dependencies of Xamarin.Firebase.Messaging.
    Check the following links for more information:
    https://forums.xamarin.com/discussion/89559/did-not-find-reference-matching-restoreassemblyresources-assemblyname-metadata
    https://stackoverflow.com/questions/45111848/did-not-find-reference-matching-restoreassemblyresources-assemblyname-metadata

  • pranay99pranay99 Member ✭✭
    @BillyLiu I am targeting Android 7.0. I have tried the solutions, the error is no more, but landed into another trouble. I am getting 100 errors in the files inside obj->debug->AndroidMono->All the java files. It says symbol not found. I have tried deleting it and rebuilding it, but it doesn't seems to be helping.
  • BillyLiuBillyLiu Member, Xamarin Team Xamurai

    @pranay99

    Could you reproduce this issue in a new create blank project? If it doesn't have this issue, please try to delete both obj and bin folder and try to build the project again.
    If this issue still exists, please provide a basic demo so that I can help you to solve this problem.

  • pranay99pranay99 Member ✭✭
    @BillyLiu
    I have created a new project, it works as expected. Tried deleting obj and bin folder. Still have this issue. How can I provide a demo to you?
  • BillyLiuBillyLiu Member, Xamarin Team Xamurai

    @pranay99

    You could attach your project(.zip) or through GitHub.

  • pranay99pranay99 Member ✭✭

    @BillyLiu
    I have certain restrictions, so can not really share project with you.
    But can post an error here.
    error: cannot find symbol md5a66bf8bbdf4ec0e8c2720c8a47b81539.SearchViewCompat_IOnCloseListener symbol: class SearchViewCompat_IOnCloseListener location: package md5a66bf8bbdf4ec0e8c2720c8a47b81539

    Path to the file is
    projectName.Android\obj\Debug\MonoAndroid70\android\src\md5a66bf8bbdf4ec0e8c2720c8a47b81539

  • pranay99pranay99 Member ✭✭
    Accepted Answer

    So I found the solution for this problem. I don't know how but there was Mono.Android.dll added in both Portable project and in Droid project, and therefore were the errors. So I just deleted both the dll files and tried building the project, and it worked fine. I guess few nuget packages had error and ended up adding dll files in both the projects.

Sign In or Register to comment.