Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

Commit fb9ea3d

Browse files
authored
asdf update (#13)
* Minor markdown lint and copyedit * Modernize asdf instructions for >= 0.16 * Simplify documented version * Recommend nodejs install via asdf
1 parent aadf526 commit fb9ea3d

3 files changed

Lines changed: 20 additions & 20 deletions

File tree

README.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,41 @@ This Android Studio project wraps the [Desktop Sample App](https://github.com/el
44

55
## Runtime Notes
66

7-
The pre-built Erlang runtime for Android ARM/ARM64/x86 is embedded in this example git repository. These native runtime files include Erlang OTP and the exqlite nif to use SQLite on the mobile. These runtimes are generated using the CI of the [Desktop Runtime](https://github.com/elixir-desktop/runtimes) repository.
7+
The pre-built Erlang runtime for Android ARM/ARM64/x86 is embedded in this example git repository. These native runtime files include Erlang/OTP and the exqlite nif to use SQLite on the mobile. These runtimes are generated using the CI of the [Desktop Runtime](https://github.com/elixir-desktop/runtimes) repository.
88

9-
Because Erlang OTP has many native hooks for networking and cryptographics the Erlang version used to compile your App must match the pre-built binary release that is embedded. In this example that is Erlang OTP 25.0.4. This sample is shipping with a `.tool-versions` file that `asdf` will automatically use to automate this requirement.
9+
Because Erlang/OTP has many native hooks for networking and cryptographics the Erlang version used to compile your App must match the pre-built binary release that is embedded. In this example that is Erlang/OTP 26.2.5. This sample is shipping with a `.tool-versions` file that `asdf` will automatically use to automate this requirement.
1010

1111
## How to build & run
1212

1313
1. Install [Android Studio](https://developer.android.com/studio) + NDK.
14-
1. Install git, npm, asdf
14+
1. Install [asdf](https://asdf-vm.com/guide/getting-started.html), for example:
1515

16-
```
17-
sudo apt install git npm curl
18-
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.2
19-
echo ". $HOME/.asdf/asdf.sh" >> ~/.bashrc
20-
echo ". $HOME/.asdf/completions/asdf.bash" >> ~/.bashrc
21-
. $HOME/.asdf/asdf.sh
16+
```shell
17+
sudo apt install curl
18+
curl --silent --location -o - https://github.com/asdf-vm/asdf/releases/download/v0.18.0/asdf-v0.18.0-linux-amd64.tar.gz | tar xzf - -C ~/bin/
19+
export PATH="$PATH:~/bin"
2220
```
2321

24-
1. Install Erlang-OTP (with openssl) in the same version 26.2.5 as the bundled runtime edition:
22+
1. Install Erlang/OTP (with openssl) in the same version as the bundled runtime edition:
2523

26-
```
27-
asdf install erlang 26.2.5
28-
asdf install elixir 1.17.2-otp-26
24+
```shell
25+
asdf plugin add erlang
26+
asdf plugin add elixir
27+
asdf plugin add nodejs
28+
cd app && asdf install
2929
```
3030

31-
1. Go to "Files -> New -> Project from Version Control" and enter this URL: https://github.com/elixir-desktop/android-example-app/
31+
1. Go to "Files -> New -> Project from Version Control" and enter this URL: [https://github.com/elixir-desktop/android-example-app/] or open your locally cloned directory.
3232

3333
1. Start the App
3434

35-
3635
## Customize app name and branding
3736

3837
Update these places with your package name:
3938

4039
1) App name in [strings.xml](app/src/main/res/values/strings.xml#L2) and [settings.gradle](settings.gradle)
4140
1) Package names in [Bridge.kt:1](app/src/main/java/io/elixirdesktop/example/Bridge.kt#L1) and [MainActivity.kt:1](app/src/main/java/io/elixirdesktop/example/MainActivity.kt#L1) (rename `package io.elixirdesktop.example` -> `com.yourapp.name` or use the Android Studios refactor tool)
42-
1) App icon: [ic_launcher_foreground.xml](app/src/main/res/drawable-v24/ic_launcher_foreground.xml) and [ic_launcher-playstore.png](app/src/main/ic_launcher-playstore.png)
41+
1) App icon: [ic_launcher_foreground.xml](app/src/main/res/drawable-v24/ic_launcher_foreground.xml) and [ic_launcher-playstore.png](app/src/main/ic_launcher-playstore.png)
4342
1) App colors: [colors.xml](app/src/main/res/values/colors.xml) and launcher background [ic_launcher_background.xml](app/src/main/res/values/ic_launcher_background.xml)
4443

4544
## Known todos
@@ -52,11 +51,11 @@ Running the app for the first time will extract the full Elixir & App runtime at
5251

5352
This sample only launch the elixir app and shows it in an Android WebView. There is no integration yet with the Android Clipboard, sharing or other OS capabilities. They can though easily be added to the `Bridge.kt` file when needed.
5453

55-
## Other notes
54+
## Other notes
5655

57-
- Android specific settings, icons and metadata are all contained in this Android Studio wrapper project.
56+
- Android specific settings, icons and metadata are all contained in this Android Studio wrapper project.
5857

59-
- `Bridge.kt` and the native library are doing most of the wrapping of the Elixir runtime.
58+
- `Bridge.kt` and the native library are doing most of the wrapping of the Elixir runtime.
6059

6160
## Screenshots
6261

app/.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
erlang 26.2.5
22
elixir 1.17.2-otp-26
3+
nodejs 22.19.0

app/run_mix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
. ~/.asdf/asdf.sh
2+
export PATH="$HOME/.asdf/shims:$PATH"
33
set -e
44

55
BASE=`pwd`

0 commit comments

Comments
 (0)