Pytorch model integration with android studio

I am making an android app that takes x-ray images as an input and gives the class of the disease as an output. A pretrained model has been made and I am integrating it with android studio. However, I am facing runtime errors with the model. After classifying the disease label, the result needs to be stored in a database and here is where the error is. Can someone help me with this problem of integration of model?