1

I had to change android build from x86 to x64, and after doing that an error occurs while trying to create a table in sqllite using xamarin

public ObraDao(ISqliteConnectionService connectionService)
        {
            connection = connectionService.GetConnectionAsync();
            if (connection != null)
                CreateTable();
        }

        private async void CreateTable()
        {
            await connection.CreateTableAsync<ViewObra>();
        }
Error: Could not resolve type with token 0100004c from typeref (expected class 'SQLite.CreateTableResult' in assembly 'SQLite-net, Version=1.5.231.0, Culture=neutral, PublicKeyToken=null') assembly:SQLite-net, Version=1.5.231.0, Culture=neutral, PublicKeyToken=null type:SQLite.CreateTableResult member:(null)
Anoop R Desai
  • 712
  • 5
  • 18
D Wojcik
  • 23
  • 4
  • A general suggestion - you may not want to make `CreateTable()` `async void`. Have a look at [async/await - when to return a Task vs void?](https://stackoverflow.com/questions/12144077/async-await-when-to-return-a-task-vs-void). – Anoop R Desai Sep 13 '19 at 20:39
  • Thank you, I really didn't realize that. – D Wojcik Sep 13 '19 at 20:56
  • @DWojcik Hi , have you solved it ? Here is a [discussion](https://stackoverflow.com/questions/18163354/sqlite-dll-for-x86-x64-architectures) , maybe helpful . – Junior Jiang Sep 16 '19 at 06:54
  • Hi, not yet. Thanks! Sqlite-related packages are already up to date – D Wojcik Sep 16 '19 at 12:18
  • I removed the sqlite packages from all projects in the solution and installed it again. It worked... It seems that solved. – D Wojcik Sep 16 '19 at 12:46

0 Answers0