Elixir Desktop starts then crashes in Android Studio

So, I just tried running our large Phoenix LiveView app as a Desktop app and it worked on my Linux (Intel) machine.

Then I tried android example app (in Android Studio) and it starts then crashes. Won’t even try our web app because it won’t run as it is on Android for sure for a number of reasons, but I’d like to see the android example app running before engaging further into thinking about porting our web app.

The short history of steps and issues with the android example app:

  1. The (new version of) Android Studio complained about Java 21 not being supported by the app so I let it use Oracle Java 1.18 SDK then it worked.
  2. Then the run_mix failed because it required libglib2.0-dev (even for Android?), so I installed it and then it passed.
  3. After this, the emulator started and the Todo app too but as soon as it starts it crashes (the Todo app). There was a notification on Android 16KB page size error.
  4. I created a new instance out of the 36.1 and edited it to 33 (downloaded the API). The page size notification is no more, but the Todo app still crashes a couple of secs after opening it.

Can you help on how to proceed?

Thanks

EDIT: This is from the Android Studio Logcat:

[notice] Application todo_app exited: exited in: TodoApp.start(:normal, [])
** (EXIT) exited in: DBConnection.Holder.c...
: TodoApp.Repo, timeout: 15000, pool_size: 10])
** (EXIT) no process: the process is not alive or there's no process cu...
1 Like

@dominicletz So I found the bug - it’s the combo of an unpinned :exqlite version (that :ecto_sqlite3 depends on) and the prebuilt Erlang/Elixir.

The quick fix is adding something like this to the demo-example-app’s mix.exs:

{:exqlite, "0.15.0", override: true},
4 Likes