# Build CODE for Android

**URL:** <https://forum.collaboraonline.com/t/build-code-for-android/455>\
**Category:** Development\
**Created:** [July 13, 2021, 9:11am UTC](https://forum.collaboraonline.com/t/build-code-for-android/455 "2021-07-13T09:11:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![CanoeCat](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@CanoeCat](https://forum.collaboraonline.com/u/CanoeCat)\
**Post date:** [July 13, 2021, 9:11am UTC](https://forum.collaboraonline.com/t/build-code-for-android/455/1 "2021-07-13T09:11:51Z")

</div>

Hello! I tried to compile Android on CollaboraOnline and the ARMv7 for LibreOffice was successfully compiled and working properly. CollaboraOnline android build the prompt JS, HTML and CSS has had been updated (android/lib/SRC/main/assets/dist).

 ![1212121](https://europe1.discourse-cdn.com/flex013/uploads/collaboraonline/original/1X/56ea90000265ed0f51f77685ae95877300040d59.png)

However, in fact, my android/lib/ SRC /main directory does not generate assets directory, may I ask what causes it?  
NDK version: 20.1.5948944 (same as the cross-compiled version of LibreOffice)  
Configuration information for the CollaboraOnline Android compilation:

```auto
./configure --enable-androidapp \
--with-lo-builddir=/LibreOffice/core-armv7 \
 --with-poco-includes=/opt/poco-android/include \
--with-poco-libs=/opt/poco-android/lib \
CC=/home/goalgo/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang \
CXX=/home/goalgo/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang++ \
--host=arm-linux-androideabi \
--disable-setcap --enable-silent-rules --enable-debug   

```

---

<div class="post-metadata">

**Author:** ![CanoeCat](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@CanoeCat](https://forum.collaboraonline.com/u/CanoeCat)\
**Post date:** [August 17, 2021, 7:31am UTC](https://forum.collaboraonline.com/t/build-code-for-android/455/2 "2021-08-17T07:31:32Z")

</div>

I have solved the problems associated with building Android,  
In addition to compiling from this article:[Build for Android | Collabora Online - Community Page](https://collaboraonline.github.io/post/build-code-android/)  
We need to know that we should build on the 6.4 branch,  
The branches that you need are:  
core: distro/collabora/cp-6.4  
online: distro/collabora/co-6-4

---

<div class="post-metadata">

**Author:** ![svk](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@svk](https://forum.collaboraonline.com/u/svk)\
**Post date:** [February 22, 2022, 10:21am UTC](https://forum.collaboraonline.com/t/build-code-for-android/455/3 "2022-02-22T10:21:02Z")

</div>

Hello! I used core 6.4 branch for android build, build(in-progress) is struck when trying to clone a sub module.

…  
Submodule ‘translations’ ([https://gerrit.libreoffice.org/translations](https://gerrit.libreoffice.org/translations)) registered for path ‘translations’  
Submodule ‘dictionaries’ ([https://gerrit.libreoffice.org/dictionaries](https://gerrit.libreoffice.org/dictionaries)) registered for path ‘dictionaries’  
Cloning into ‘/home/xx…/core/translations’…

Build is on hold at this point and does not go to next step, tried 3 times. Tried for 2 days as I beileve it is due to remote git not responding.  
Any support in overcoming the current situation is much appreciated.

---

<div class="post-metadata">

**Author:** ![pedro.silva](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/pedro.silva/32/4_2.png) [@pedro.silva](https://forum.collaboraonline.com/u/pedro.silva)\
**Post date:** [February 22, 2022, 2:56pm UTC](https://forum.collaboraonline.com/t/build-code-for-android/455/4 "2022-02-22T14:56:58Z")

</div>

That’s strange I just clone the translations’ repository 🤔

---

<div class="post-metadata">

**Author:** ![svk](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@svk](https://forum.collaboraonline.com/u/svk)\
**Post date:** [February 23, 2022, 4:49am UTC](https://forum.collaboraonline.com/t/build-code-for-android/455/5 "2022-02-23T04:49:40Z")

</div>

Hi Pedro,  
Firstly thanks for trying it.  
I tried to clone the translations repository idependently just as you did, still I get a similar response from the remote side.

Here’s the response,  
~/Office\_Android/test\_translations\_git$ git clone [https://gerrit.libreoffice.org/translations.git](https://gerrit.libreoffice.org/translations.git)  
Cloning into ‘translations’…  
remote: Counting objects: 921, done  
error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.  
fatal: The remote end hung up unexpectedly  
fatal: early EOF  
fatal: index-pack failed

---

<div class="post-metadata">

**Author:** ![pedro.silva](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/pedro.silva/32/4_2.png) [@pedro.silva](https://forum.collaboraonline.com/u/pedro.silva)\
**Post date:** [February 23, 2022, 9:25am UTC](https://forum.collaboraonline.com/t/build-code-for-android/455/6 "2022-02-23T09:25:24Z")

</div>

I tried `git clone "https://git.libreoffice.org/translations"` and it worked

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/collaboraonline/original/1X/59c7ef7afe25a519547327768f8ddc1bb0f5d19c.png)

---

<div class="post-metadata">

**Author:** ![svk](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@svk](https://forum.collaboraonline.com/u/svk)\
**Post date:** [February 23, 2022, 1:19pm UTC](https://forum.collaboraonline.com/t/build-code-for-android/455/7 "2022-02-23T13:19:20Z")

</div>

I tried using git clone [translations - Gitiles](https://git.libreoffice.org/translations), it fails to download.

Here’s the output:  
test\_translations\_git$ git clone [translations - Gitiles](https://git.libreoffice.org/translations)  
Cloning into ‘translations’…  
remote: Counting objects: 921, done  
error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received.  
fatal: The remote end hung up unexpectedly  
fatal: early EOF  
fatal: index-pack failed

However during the build it is referring to https:// **gerrit**.libreoffice.org/translations, so initially I tried using the same link to confirm it.

---

<div class="post-metadata">

**Author:** ![pedro.silva](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/pedro.silva/32/4_2.png) [@pedro.silva](https://forum.collaboraonline.com/u/pedro.silva)\
**Post date:** [March 3, 2022, 10:24am UTC](https://forum.collaboraonline.com/t/build-code-for-android/455/8 "2022-03-03T10:24:51Z")

</div>

Hi @svk did you happen to noticed the last [Collabora Online Weekly Meeting #61](https://forum.collaboraonline.com/t/collabora-online-weekly-meeting-61/909) ?

> - had this problem (Szymon)
> - thought git doing nothing, opened the folder – cloned repo himself.
> - Same as for core repo – after pull this repo – go back to main repo – it works.

Could you try this please?

---

<div class="post-metadata">

**Author:** ![svk](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@svk](https://forum.collaboraonline.com/u/svk)\
**Post date:** [March 7, 2022, 7:05am UTC](https://forum.collaboraonline.com/t/build-code-for-android/455/9 "2022-03-07T07:05:41Z")

</div>

Hi @pedro.silva , as I mentioned earlier I am not able to clone the tranalations git independently too.  
From below statement I guess Szymon succeeded when tried to clone independent module, correct me with more details of steps to be executed.  
" thought git doing nothing, opened the folder – cloned repo himself."

/Office\_Android/newCore64/core/translations$ git clone “[translations - Gitiles](https://git.libreoffice.org/translations)”  
Cloning into ‘translations’…  
remote: Counting objects: 927, done  
error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received.  
fatal: The remote end hung up unexpectedly  
fatal: early EOF  
fatal: index-pack failed
