Android studio Bumblebee 2021.11 was installed, because I have rebuild several other apk’s before
NDK version 21 til 25 are installed in ~/Android/SDK because I have rebuild several other apk’s before
open deltachat-android in Android studio
run in AWD Pixel5 Android12 emulation.
app was installed, but crahes after opening
log: libnative-utils.so not found
build fatDebug apk
installed apk on Redmi Note 10 Android12 device
app crashes after opening
logcat is showing: libnative-utils.so not found
in web I have found that I should run build-ndk in home folder of app sources.
error messages:
Android NDK: ERROR:jni/Android.mk:deltachat-core-rust: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that jni/armeabi-v7a/libdeltachat.a exists or that its path is correct
/home/ich/Android/Sdk/ndk/25.0.8221429/build/core/prebuilt-library.mk:51: *** Android NDK: Aborting . Schluss.
So, why does the building / comiling is not working ??
I have build succesfull Threema and Matrix client. All working fine. So I think it’s not an issue on my build environment
have you built deltachat core? you need rustup installed and some rust targets installed (for the 4 architectures android could have)
You could probably skip the architectures that are not your phone, that would result in a smaller apk, but you can then only run it on phones with that specific processor architecture
I’m have found out that I have to run ./ndk-make.sh in root of sources not of pc. But now I’m getting a build error
— stderr
/bin/sh: 1: armv7a-linux-androideabi16-clang: not found
make[1]: *** [Makefile:662: crypto/aes/aes_cbc.o] Error 127
make[1]: *** Waiting for unfinished jobs…
/bin/sh: 1: armv7a-linux-androideabi16-clang: not found
make[1]: *** [Makefile:666: crypto/aes/aes_ecb.o] Error 127
/bin/sh: 1: armv7a-linux-androideabi16-clang: not found
/bin/sh: 1: armv7a-linux-androideabi16-clang: not found
make[1]: *** [Makefile:668: crypto/aes/aes_ige.o] Error 127
make[1]: *** [Makefile:664: crypto/aes/aes_cfb.o] Error 127
make: *** [Makefile:172: build_libs] Fehler 2
thread ‘main’ panicked at ’
Package: libssl-dev
Version: 1.1.1f-1ubuntu2.12
Priority: optional
Section: libdevel
Source: openssl
Origin: Ubuntu
Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com
Original-Maintainer: Debian OpenSSL Team pkg-openssl-devel@lists.alioth.debian.org
Bugs: OpenID transaction in progress
Installed-Size: 8.009 kB
Depends: libssl1.1 (= 1.1.1f-1ubuntu2.12)
Suggests: libssl-doc
Conflicts: libssl1.0-dev
Homepage: https://www.openssl.org/
Download-Size: 1.584 kB
APT-Manual-Installed: yes
APT-Sources: Index of /ubuntu focal-updates/main amd64 Packages
Description: Werkzeugsatz für das Secure Socket Layer (SSL) - Entwicklungsdateien
Dieses Paket ist Teil der vom Projekt OpenSSL entwickelten Implementierung
der Kryptographieprotokolle SSL und TLS für sichere Internetkommunikation.
.
Es enthält Entwicklungsbibliotheken, Header-Dateien und englischsprachige
Handbuchseiten für libssl und libcrypto.
Ok the error says something about clang missing, if you have all the required rust targets (scripts/install-toolchains.sh) then my next guess would be that $ANDROID_NDK_ROOT or an other env var is not set correctly
Yes, as you can see in my first post, I have followed it step by step. And yes, Install Build Environment I have also done. I wont make my own Version so I need to build with Android Studio.
I’m a bit further. The OpenSSL error I have solved.
the armv7a-linux-androideabi16-clang error I have solved with change the make file. I have removed the 16, because NDK 25.xx has only clang files 19 and above.
Now I stuck at this error when running
error occurred: Failed to find tool. Is arm-linux-androideabi-ar installed?
I think I will give up. I have invested hours and hours to get it running, but running into one error after the other.
it’s sad, because it would be nice to have it included in my ungoogled LeOS-GSi.
./ndk-make.sh
This sounds a bit like you didn’t run ./sripts/install-toolchains.sh (but could have other reasons I don’t know of course).
In any case, if you manage to install Docker or Podman (or even already have it installed), the instructions at “Build Using Dockerfile” are generally less error-prone than the ones at “Install Build Environment (without Docker or Podman)”
By the way
Yes, building Threema and Matrix is easier since you don’t have to compile some Rust code first and
All of the build instructions in the Readme are about dc core except for some lonely lines (“./gradlew assembleDebug”, “Afterwards run the project in Android Studio.”)
This is because while building the Android part is easy, while building the rust core for Android requires some work.
Important: You do need to follow the instructions at GitHub - deltachat/deltachat-android: Email-based instant messaging for Android. even if you managed to build other apps before. The build instructions are specific to DeltaChat since we have a Rust core, and it’s not sufficient to have a build environment that can build Android apps.
in the building instruction is no single word that I have to build the dc core !!!
So, shall I only run cargo build inside the dc core folder ??? Or what have I to do ??
I hate docker. And once more: I want to change a bit in sources, so docker is not usable
scripts where running successful
I have all done successful in Linux Mint 20 and also in Linux Mint 18
Then, install Rust using [rustup](https://rustup.rs/). Install Rust toolchains for cross-compilation by executing `scripts/install-toolchains.sh`.
After that, call `./ndk-make.sh` in the root directory to build core-rust. Afterwards run the project in Android Studio. The project requires API 25.
both scrips are inside /ndk-make.sh’ folder deltachat-android and not in core folder. so the command ‘/ndk-make.sh’ have to be executed in folder deltachat-android and not in core folder. right ???
Dockerfile currently uses Android NDK 22.1.7171670 and inside docker the instruction works. Maybe there is an incompatibility with newer NDK since we have not updated it.
Use Podman, then You can change the sources just fine also if you build with Docker/Podman (the current working directory will be mapped into the container, so that only the building stuff is in the container, the source code can be edited as always)