András Tóth‘s professional blog
banditoth.net

Hey there 👋, I’m banditoth a .NET MAUI developer from Hungary.
I write about software development with .NET technologies.

You can find me on:
LinkedIn | Github | StackOverflow | X / Twitter | Threads

Category: Android

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

    This content has 5 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.

    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.

  • Android: Application auto backup ki/be kapcsolása (Xamarin is)

    This content has 5 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.

    Android 6.0 óta (API verzió v23) bevezették az Androidba, hogy az alkalmazás fájljairól biztonsági mentést készít az operációs rendszer a felhasználó Google drive-jára. A backupok mérete maximum 25MB lehet, és az Android a JobScheduler API-jával készülnek 24 órás időintervallumban. További információk itt: https://developer.android.com/guide/topics/data/autobackup

    Az érintett fájlok:

    • Shared preferences files
    • Files in the directory returned by getFilesDir()
    • Files in the directory returned by getDatabasePath(String)
    • Files in directories created with getDir(String, int)
    • Files on external storage in the directory returned by getExternalFilesDir(String)

    Mivel a Xamarin Essentials a SharedPreferencesbe teszi a Preferences statikus osztály által tárolt adatokat, ezért azok is mentésre kerülnek.

    A be/ki kapcsoláshoz az AndroidManifest.xml-ben a következő propertyre van szükség az application tagben:

    android:allowBackup="true"