title: kivy app works on pc but not on smartphone
body: <p>hope you all can help me in someway.</p>
  <p>I'm a newby in python and I'm tring to make a Kivy app.
  As the title says, my app works perfectly on my pc but, as soon as I open it on my android it crashes (on the loading screen). I know how to debug the app and how to use kivy launcher, i've already tested some apps, but this one has an issue that i don't know how to fix.</p>
  <p>What i'm tring to do is:</p>
  <ul>
  <li><p>pickup an image;</p>
  </li>
  <li><p>transform it into an numpy array;</p>
  </li>
  <li><p>select an circular area of the image and save the pixels of this area into a new list;</p>
  </li>
  <li><p>calculate the mean value of the pixels and classify the image according to some parameters.</p>
  </li>
  </ul>
  <p>Again, I can do all this things on my pc (but if someone has something that would help me to improve me coding skills... I'd be glad to hear some tips).</p>
  <p>The issue seems to be on the way I try to open the image inside my code, but I really don't know why since the directory of the image is the same as the one my main.py is saved, so i though i just needed to open the image as always (indicating the name of the file).</p>
  <p>here is my code:</p>
  <pre><code>#-*- coding: utf-8 -*-
  
  import kivy
  
  from kivy.app import App
  
  from kivy.uix.label import Label
  
  from kivy.uix.boxlayout import BoxLayout
  
  from kivy.uix.button import Button
  
  kivy.require('1.9.1')
  
  
  class MeuApp(App):
      def build(self):
          import matplotlib.pyplot as plt
  
          import matplotlib.image as mpimg
  
          import numpy as np
          import math
  
          img = r&quot;C:\Users\Carlos Foiani\Dropbox\My PC (NOT-CAVIOLA)\Desktop\Letícia\UFABC\Pesquisa\PDPD -2020\24.02.2021\Todas\CN 9_3 - cor.jpg&quot;
  
          # Leitura da fotografia
          foto = mpimg.imread(img)
          linhas = len(foto)
          colunas = len(foto[0])
  
          array_pixels = np.array(foto)
          lista_pixels = array_pixels.tolist()
  
          dentro = []
          # Desenho de um círculo
  
          for i in range(linhas):
              for j in range(colunas):
  
                  if (i - linhas // 2) ** 2 + (j - colunas // 2) ** 2 &lt;= (colunas // 2) ** 2:
                      dentro.append(lista_pixels[i][j])
  
                  else:
                      foto[i, j] = sum(foto[i, j]) / 3 - 0.5
  
          # Visualizar a fotografia
          plt.imshow(foto)
          plt.show()
  
          raio = (colunas // 2)
          area = np.pi * (raio ** 2)
          OD = math.log((255 / (np.mean(dentro))), 10)
          ODI = OD * area
  
          a = &quot;[b]Intensidade média de luz transmitida pela imagem:[/b] &quot; + str(np.mean(dentro)) + &quot; \n&quot;
          b = &quot;\n [b]Área:[/b] &quot; + str(area) + &quot; μm \n&quot;
          c = &quot;\n [b]Densidade óptica:[/b] &quot; + str(OD) + &quot; \n&quot;
          d = &quot;\n [b]Densidade óptica integrada:[/b] &quot; + str(ODI) + &quot; \n&quot;
  
          if ODI &lt; 674353.78:
              e = &quot;\n Essa amostra faz parte do grupo [b]POSITIVO[/b] para carcinoma \n&quot;
  
              return Label(text=a+b+c+d+e, markup=True)
  
          elif ODI &gt; 674353.78:
  
              e = &quot;\n Essa amostra faz parte do grupo [b]NEGATIVO[/b] para carcinoma \n&quot;
  
              return Label(text=a+b+c+d+e, markup=True)
  
  
  if __name__ == '__main__':
      MeuApp().run()
  </code></pre>
  <p><a href="https://i.stack.imgur.com/3W9BO.png" rel="nofollow noreferrer">Heres is what I expect to see on the smartphone (and what I'm getting on my pc</a></p>
  <p>I've tried opening the image usem some kivy libraries (such as kivy.uix.image) but they doesn't let me transform the image into an array.</p>
  <p>This is just the first version of the app, but I need it to run on android as soon as possible so that I can use it as a result for my research. I intend to make this better, just not now.</p>
  <p>thanks in advance for any kind of help!</p>