# Android libTorch

**URL:** <https://discuss.pytorch.org/t/android-libtorch/195821>\
**Category:** Mobile\
**Created:** [January 21, 2024, 7:52pm UTC](https://discuss.pytorch.org/t/android-libtorch/195821 "2024-01-21T19:52:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![drus13](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/drus13/32/62352_2.png) [@drus13](https://discuss.pytorch.org/u/drus13)\
**Post date:** [January 21, 2024, 7:52pm UTC](https://discuss.pytorch.org/t/android-libtorch/195821/1 "2024-01-21T19:52:48Z")

</div>

Hello everyone! I have some questions accordingly pytorch repository, I trying to build libtorch for Android. I would like to know if you have recently been able to build the library and your source code with the model using the provided scripts in the repository? I want to learn how to train a model using a simple MNIST training problem using libtorch on Android, but I encounter numerous errors when trying to build a library or compile my source code. Maybe some of you guys will have time and could help me, I would be very grateful.

---

<div class="post-metadata">

**Author:** ![marksaroufim](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/marksaroufim/32/36747_2.png) [@marksaroufim](https://discuss.pytorch.org/u/marksaroufim)\
**Post date:** [January 22, 2024, 6:22am UTC](https://discuss.pytorch.org/t/android-libtorch/195821/2 "2024-01-22T06:22:31Z")

</div>

I don’t believe libtorch for android is maintained at this point, the new recommendation for mobile builds is to use executorch [GitHub - pytorch/executorch: End-to-end solution for enabling on-device AI across mobile and edge devices for PyTorch models](https://github.com/pytorch/executorch)

---

<div class="post-metadata">

**Author:** ![drus13](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/drus13/32/62352_2.png) [@drus13](https://discuss.pytorch.org/u/drus13)\
**Post date:** [January 22, 2024, 9:18pm UTC](https://discuss.pytorch.org/t/android-libtorch/195821/3 "2024-01-22T21:18:50Z")

</div>

Is it possible to train model with that new framework?

---

<div class="post-metadata">

**Author:** ![marksaroufim](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/marksaroufim/32/36747_2.png) [@marksaroufim](https://discuss.pytorch.org/u/marksaroufim)\
**Post date:** [January 23, 2024, 5:32pm UTC](https://discuss.pytorch.org/t/android-libtorch/195821/4 "2024-01-23T17:32:38Z")

</div>

No executorch is primarily intended for inference

---

<div class="post-metadata">

**Author:** ![drus13](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/drus13/32/62352_2.png) [@drus13](https://discuss.pytorch.org/u/drus13)\
**Post date:** [January 23, 2024, 11:24pm UTC](https://discuss.pytorch.org/t/android-libtorch/195821/5 "2024-01-23T23:24:08Z")

</div>

Looks like it. So regarding libtorch, can it be used for simple learning on android? I think I saw several threads on this forum and someone was trying to put together a library for Android? Maybe i need to use older versions for this if the current version is not built?
