Xamarin Android: “Program type already present”

AndroidX migráció után a következő hibaüzenettel nem fordul le az alkalmazás:

D8 : error : Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy

Próbáltam mindent, kitöröltem a lokális NuGet Cache-t, az összes bin és obj mappát, Cleanelni a Solutiont, Restoreolni a NuGet-eket. Nem járt eredménnyel semmi sem. Aztán nyitottam egy hibát az AndroidX repo-n (https://github.com/xamarin/AndroidX/issues/100) , ahol a megszokotthoz képest lassan reagáltak, akkor sem tudtak érdemben segíteni, így magamnak kellett megoldást találni a problémára.

Elsőre feltelepítettem egy virtuális gépre friss Windows 10-et, rá pedig egy 2019-es Visual Studio Community-t. Lecloneoztam a repositoryt, megfordítottam, és sikeresen lefordult. Itt már gondoltam, hogy valami specifikus hiba lesz. Pár hétre jegelve lett a projekt, majd végül a megoldása az lett, hogy a host gépen teljesen eltávolítottam fizikailag az Azure DevOps GIT alapú repositoryt, majd újra leszedtem a remote-ról, és működött.

This content has 4 years. Some of the information in this post may be out of date or no longer work. Please, read this page keeping its age in your mind.

Xamarin Android: Symbols were found but are not matching the assembly

Android app fordítása meghal a következő hibával:

Symbols were found but are not matching the assembly
at Mono.Cecil.ModuleDefinition.ReadSymbols(ISymbolReader reader, Boolean throwIfSymbolsAreNotMaching)
at Mono.Cecil.ModuleReader.ReadSymbols(ModuleDefinition module, ReaderParameters parameters)
at Mono.Cecil.ModuleReader.CreateModule(Image image, ReaderParameters parameters)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
at Xamarin.AndroidX.Migration.CecilMigrator.Migrate(String source, String destination)
at Xamarin.AndroidX.Migration.CecilMigrator.Migrate(IEnumerable`1 assemblies)
at Xamarin.AndroidX.Migration.BuildTasks.CecilfyFiles.Execute()

Xamarin Forms verzió növelés (4.5), és AndroidX csomag telepítés után.

Frissen telepített Windowson, és friss VisualStudion nem jött a hiba. A bin/obj könyvtárak törlése nem oldja meg a problémát.

A hiba a hibás PDB fájlokból származhat. GitHub-on nyitottam hozzá egy Issue-t, ami itt található: https://github.com/xamarin/AndroidX/issues/93

Xamarin/AndroidXMigration 1.0.6-ban javítva.

This content has 4 years. Some of the information in this post may be out of date or no longer work. Please, read this page keeping its age in your mind.