update erlang 25.4 -> 26.2
build erlang 26.2 by runtime replace app/assets's runtime files and run but below error
["beam/beam_load.c(190): Error loading module application_controller:\n This BEAM file was compiled for a later version of the runtime system than the current (Erlang/OTP 25).
To fix this, please re-compile this module with an Erlang/OTP 25 compiler.
(Use of opcode 181; this emulator supports only up to 180.)
I suspect that not only the runtime update but also an update of libs/erlang.jar is necessary.
How is erlang.jar created?
It is created using the runtimes github repo: https://github.com/elixir-desktop/runtimes
Happy to help with that. And let me know if you have ideas of how to make this easier.
I have had no problems creating the following files using
arm64-v8a-runtime.zip armeabi-v7a-runtime.zip x86_64-runtime.zip
but erlang.jar not created https://github.com/elixir-desktop/android-example-app/blob/master/app/libs/erlang.jar
Although not runtime, I have created a library to easily create app projects
https://github.com/thehaigo/desktop_setup
Yeah, previously I've done the last step manually but it's quite straight forward. (would love a PR for that)
- Extract the three runtime zip files into their own directories.
- Create a new
libdirectory and copy the files with prefixesarm64-v8a|armeabi-v7a|x86_64respectively into lib - zip the
libdirectory and rename to erlang.jar
The result should then have this layout:
$ zipinfo -2 ./app/libs/erlang.jar
lib/
lib/arm64-v8a/
lib/arm64-v8a/liberlang.so
lib/arm64-v8a/lib__erl_child_setup.so
lib/arm64-v8a/lib__inet_gethost.so
lib/armeabi-v7a/
lib/armeabi-v7a/liberlang.so
lib/armeabi-v7a/lib__inet_gethost.so
lib/armeabi-v7a/lib__erl_child_setup.so
lib/x86_64/
lib/x86_64/liberlang.so
lib/x86_64/lib__erl_child_setup.so
lib/x86_64/lib__inet_gethost.so
work it! thank you!
I tried jar command, but not works 😢
I'll create a PR later.
Hey I've done a major update to the runtimes and will update this projects structure soon following that and using static linking