Forum Xamarin.Forms

App crash when distributed in app bundle format

FMGNoobFMGNoob Member ✭✭

When i release as "bundle", i got this crash : (At the beginning page)

But apk format it works,

My android options :
dex compiler : dx
code shrinker : ProGuard
linker : Sdk Assemblies Only

Best Answer

  • FMGNoobFMGNoob Member ✭✭
    Accepted Answer

    Error disappeared , i gues it was a bug that i could not find exactly. I start using sqlite with Entity framework maybe it effected idknw really.

Answers

  • FMGNoobFMGNoob Member ✭✭

    Yesterday everything was okay , i don't really remember what i changed but today i can not release as bundle , it crashes when it is opening. :(

  • FMGNoobFMGNoob Member ✭✭

    I realize that , on android 8 and android 10 devices it works fine but on android 9 it crashes.

  • jezhjezh Member, Xamarin Team Xamurai

    According to the error you post, we could find that the problem is that the app couldn't create table without columns.

    And we couldn't reproduce this question on our side, could you please post a basic demo so that we can try to reproduce this on our side?

  • FMGNoobFMGNoob Member ✭✭
    edited April 2020

    Thanks for your answer,

    This is the project : https://github.com/fatihmgenc/SpeedRead (sorry for false codings. i am a real noob)

    Database codes :

    public class Database
    {
        readonly SQLiteAsyncConnection _database;
    
        public Database(string dBPath)
        {
            _database = new SQLiteAsyncConnection(dBPath);
            _database.CreateTableAsync<Metin>().Wait();
        }
        public Task<List<Metin>> GetMetinAsync()
        {
            return _database.Table<Metin>().ToListAsync();  
        }
    
        public Task<List<Metin>> GetMetinByTitle(String baslik)
        {
            return _database.QueryAsync<Metin>("Select ID from Metin where baslikText="+baslik);
        }
    
         public Task<int> SaveMetinAsycn(Metin metin)
        {
            return _database.InsertAsync(metin);
        }
    }
    
    
    
    public class Metin
    {
        [PrimaryKey, AutoIncrement]
        public int ID { get; set; }
    
        public string baslikText { get; set; }
        public string metinText { get; set; }
    }
    
  • FMGNoobFMGNoob Member ✭✭

    I noticed same problem at different project , which is released as bundle , this bug report also has same sql errors. i thinks it is not about with database code because i didn't even touch it for a while..

  • jezhjezh Member, Xamarin Team Xamurai

    Hey friend @FMGNoob I couldn't reproduce this question according the setting you mentioned. I tested on Huawei Mate30 (android 10).

    Does this problem occur on other devices?

    To help us investigate on your issue, could you please share more information with us?
    1. What's the device you used to test;
    2. The android version ;

    Best Regards!

  • FMGNoobFMGNoob Member ✭✭

    Nexus 5 - 9.0 API-28 x86 = Bundle Not Working / Apk is working fine
    Nexus 4 - 9.0 API-28 x86 = Working
    Pixel 2 - 8.0 API - 26 x86 = Working
    Pixel 2 - 10.0 API - 29 x86 = Working
    Xiaomi Mi 5 - 8.0 (I guess it is ARMv8-A)= Working ,

    Interested point : when i put it on play store as bundle at mi5 phone it wasn't working but i tried with usb cable release now it is working ( bug report at the top belong to this phone.)

  • FMGNoobFMGNoob Member ✭✭
    Accepted Answer

    Error disappeared , i gues it was a bug that i could not find exactly. I start using sqlite with Entity framework maybe it effected idknw really.

Sign In or Register to comment.