Unable to generate apk from android source code from github

Hello Support,

I am Unable to generate apk from android source code from github, it is saying file missing. Please refer attached screenshot.

Please suggest why I am getting that.

hi, @rakeshjha - first of all, welcome aboard :slight_smile:

unfortunately, the screenshot does not work, maybe try to edit your post and try to add it again? or reply with a screenshot.

in general, you need to set up a working build environment to get things compiling, this may be tricky, indeed :slight_smile: there are some hints about this at https://github.com/deltachat/deltachat-android/#build - and for the rust part at https://github.com/deltachat/deltachat-android/blob/master/ndk-make.sh#L7

Hello r10s,
Thank you!

I have updated the screenshot. I have followed all those link to compile only.

Rakesh Jha

Did you run the ndk-make.sh script?

Hello Simon,

Yes I have run this script also but same issue. Please suggest if anything still missing.

A screenshot is not enough for me to find that out.
What master commit were you using?
What exact commands did you run and what is the full output of them?

it seems the libraries generated by ./ndk-make.sh are not there or cannot be found.

i would first check, after executing ./ndk-make.sh (not: ndk-build) manually from the command line, that the files


exist and have several megabytes as file size. Android Studio is not needed at this point at all.

1 Like

Hello Simon,

I am using - https://github.com/deltachat/deltachat-android master commit. Please see below screenshot.

Master is the branch, commit is https://github.com/deltachat/deltachat-android/commit/b11f293dfd46ed22ab17d2b8b54c259c2587a0af whose reduced code is (in this case) b11f293


It could be referenced as a register of a change in the project and the branch could be referenced as a snapshot of the project where any usually work for specific things. The commits are made in a branch but some branches could share some commits.

ok, Thank you!

I will check and let you know.

Hello Echedey,

here is error I got when try to build the SDK

starting time: Thu Jan 30 23:49:53 EAT 2020
– cross compiling to armv7-linux-androideabi (arm) –
Compiling cfg-if v0.1.10
Compiling spin v0.5.2
Compiling scopeguard v1.0.0
Compiling slab v0.4.2
error[E0463]: can’t find crate for core
= note: the armv7-linux-androideabi target may not be installed

error[E0463]: can’t find crate for core
= note: the armv7-linux-androideabi target may not be installed

error[E0463]: can’t find crate for core
= note: the armv7-linux-androideabi target may not be installed

error: aborting due to previous error

error: aborting due to previous error

Please suggest.

maybe do that?

Did you follow the steps described in the comments inside of the ndk-make.sh script?

yes followed.

Please update documentation for android, it seems something missing from it. I have tried many times but it failed.

@rakeshjha I still don’t have enough information to help you. I could try building android myself and see if I run in the same issue. but right now I don’t have time for it, maybe in the next week.

@Simon I have mentioned the error which I received while building SDK, so what other information you need so it can help you?

i think rust is still not yet set up correctly, the error

error[E0463]: can’t find crate for core
= note: the armv7-linux-androideabi target may not be installed

has to be targeted first. so, the installation of armv7-linux-androideabi as described at https://github.com/deltachat/deltachat-android/blob/master/ndk-make.sh#L9 did not succeed yet. did you get any errors when trying to set up rust with the command suggested there? also, searching for “error[E0463]: can’t find crate for core” shows a lot of hints, maybe some of them match to your problem? i am no rust-expert, so this is all i can tell for now :slight_smile:

I have followed the steps mentioned in file - ndk-make.sh

I have fired the command - “~/.cargo/config”

it said - if there is a file then it’s ok otherwise it will create

but in my terminal it says “There is no file or folder available in this path”

so I made it by myself and edit the content in “cargo-config.toml”

Now followed below

open ndk-make.sh in an editor and follow the instructions to set up a rust build environment. This is needed only once. and it was success.

call ./ndk-make.sh in the root directory to build core-rust.

and got error - “ndk-make.sh” file line: 33 i got error for “armv7-linux-androideabi”

on every OS I have only this error comes

it is compiling many packages

when I run the ./ndk-make.sh command in terminal

but some packages are not compiling and got build error

and in terminal it display “do you have armv7-linux-androideabi installed?” though it is installed.

Please suggest.

@rakeshjha maybe others have some ideas. apart from my suggestions above, i am a bit out of ideas. however, it seems it is still the rust setup that has failed. but, unfortunately, i am not a rust expert yet :wink:

Hello Simon,

have you tried to building android?

Rakesh Jha