Cannot build Android app on Linux

Hi,

I’m following the steps on this page to build Mattermost Android app on Linux:
https://developers.mattermost.com/contribute/mobile/build-your-own/preparation/

Yes, I already had Android SDK, npm, ruby etc installed. When running:

make build-android

I got this error:

mattermost-mobile@1.27.0 check /home/anta40/work/mattermost-mobile
eslint --ignore-path .gitignore --ignore-pattern node_modules --quiet .

mkdir -p tmp
cp assets/base/i18n/en.json tmp/en.json
mkdir -p tmp/fake-webapp-dir/i18n/
echo ‘{}’ > tmp/fake-webapp-dir/i18n/en.json
npm run mmjstool – i18n extract-mobile --webapp-dir tmp/fake-webapp-dir --mobile-dir .

mattermost-mobile@1.27.0 mmjstool /home/anta40/work/mattermost-mobile
mmjstool “i18n” “extract-mobile” “–webapp-dir” “tmp/fake-webapp-dir” “–mobile-dir” “.”

diff tmp/en.json assets/base/i18n/en.json
rm -rf tmp
React Native packager server already running
Building Android app
Could not find aws-partitions-1.258.0 in any of the sources
Run bundle install to install missing gems.
make: *** [Makefile:183: build-android] Error 7
anta40@stalingrad:~/work/mattermost-mobile$

Running

bundle install

Gives this error:

Could not locate Gemfile

How to fix this?

I am having the exact same problem. I have to keep running make android-unsigned over and over again then gem install -v ‘=’. No idea how to install all the dependencies. Yes I tried both make pre-build and pre-run.

Anyone have any ideas?

I figured it out, you need to cd into ./fastlane THEN run bundle install

Would have been nice to know that earlier.

1 Like