NÃO CONSIGO CRIAR UM APK NO LINUX USANDO BUILDOZER !!!

498 views
Skip to first unread message

Féllpz

unread,
Sep 12, 2019, 4:41:13 PM9/12/19
to Kivy users support
Estou tentando executar um comando no terminal do ubuntu para gerar um apk !!!

Comando: 

  kivy@kivy-complete:~/Repos/Python3/kivy/examples/demo/touchtracer$ buildozer android debug deploy run

Tudo ocorre normalmente, porém em um momento a operação é interrompida e é mostrado um erro.

Erro:

  Traceback (most recent call last):

  File "/usr/local/bin/buildozer", line 9, in <module>
    load_entry_point('buildozer', 'console_scripts', 'buildozer')()

  File "/home/kivy/Repos/buildozer/buildozer/scripts/client.py", line 13, in main
    Buildozer().run_command(sys.argv[1:])

  File "/home/kivy/Repos/buildozer/buildozer/__init__.py", line 1058, in run_command
    self.target.run_commands(args)

  File "/home/kivy/Repos/buildozer/buildozer/target.py", line 91, in run_commands
    func(args)

  File "/home/kivy/Repos/buildozer/buildozer/target.py", line 103, in cmd_debug
    self.buildozer.build()

  File "/home/kivy/Repos/buildozer/buildozer/__init__.py", line 212, in build
    self.target.build_package()

  File "/home/kivy/Repos/buildozer/buildozer/targets/android.py", line 642, in build_package
    version = self.buildozer.get_version()

  File "/home/kivy/Repos/buildozer/buildozer/__init__.py", line 710, in get_version
    with open(fn) as fd:

IOError: [Errno 2] No such file or directory: './main.py\n#version = 1'

Alguém sabe me dizer oque estou fazendo de errado?? preciso de ajuda, obrigado...!

Fabio da Silva Pedro

unread,
Sep 12, 2019, 4:59:56 PM9/12/19
to kivy-...@googlegroups.com
tenho algumas pistas!

-Está executando o buildozer no mesmo repositório(venv) onde ele está instalado?
-Voce criou o spec com o buildozer? Pois ele carrega algumas features para poder "compilar o apk"
- O nome do seu projeto é main.py? o Buildozer só reconheçe este nome, se for esse o caso, renomeie seu app para main.py

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/07a1b97c-c4e6-4046-851b-6640725dcc9e%40googlegroups.com.


--
Fábio S. Pedro 
(21) 97569-7573(WhatsApp).

felipe vieira

unread,
Sep 12, 2019, 7:46:40 PM9/12/19
to Kivy users support
Provavelmente seja o nome do arquivo .py
Coloque como: main.py como disse Fabio -

Féllpz

unread,
Sep 12, 2019, 8:14:11 PM9/12/19
to kivy-...@googlegroups.com
Obrigado pessoal, vou verificar essas pistas e tentar gerar o APK novamente, valeu pela ajuda 👍

Féllpz

unread,
Sep 16, 2019, 5:51:09 PM9/16/19
to kivy-...@googlegroups.com
Fiz tudo que me indicaram, o nome do projeto está como main.py, e o arquivo spec está presente no diretório, estou executando o Bulldozer no diretório onde está o arquivo main.py, porém o erro (No such file or directory: './main.py\n#version = 1') continua a aparecer ! 

Em qui, 12 de set de 2019 17:59, Fabio da Silva Pedro <fabio.si...@gmail.com> escreveu:

Robert Flatt

unread,
Sep 16, 2019, 8:33:15 PM9/16/19
to Kivy users support
>>>No such file or directory: ' ./main.py\n#version = 1 '

It looks like there is a corrupted  .spec file.

Look for the "#version = 1 " in the .spec file
It should be at the start of a line.
If no, fix it
If yes, and since the message contains a '\n', perhaps the line before contains an extra " or  '   ?

The problem will be this or something like this, you can find it. Read the .spec file as if you are Buildozer,

Buildozer does what we tell it, the trick is to find when we tell it to do something that has no meaning to Buildozer. Its all in the details ;)


On Monday, September 16, 2019 at 11:51:09 AM UTC-10, Féllpz wrote:
Fiz tudo que me indicaram, o nome do projeto está como main.py, e o arquivo spec está presente no diretório, estou executando o Bulldozer no diretório onde está o arquivo main.py, por#version = 1 ém o erro (No such file or directory: './main.py\n#version = 1') continua a aparecer ! 

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.


--
Fábio S. Pedro 
(21) 97569-7573(WhatsApp).

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.

Fabio da Silva Pedro

unread,
Sep 16, 2019, 8:57:28 PM9/16/19
to kivy-...@googlegroups.com
(No such file or directory: './main.py\n#version = 1')  

já viu se a versão declarada no main.py para o app é igual a declarada no spec?
pode ser versão do kivy declarada diferente nos dois, as versões devem estar iguais

Podem ocorrer erros na compilação do APK se o  Package domain for mantido no padrão gerado pelo buildozer, é recomendado alterar ele

# (str) Package domain (needed for android/ios packaging)
package.domain = com.seudominioficticio

Se aqui no spec a versão do seu App é essa, no seu main.py deve ser assim também 0.1, 1.2,etc...

# (str) Application versioning (method 1)
version = 0.1

Se voce usou no seu projeto o kivy.require para estabelecer a versão mínima do kivy, tanto o spec como o main devem estar iguais

# Kivy version to use
osx.kivy_version = 1.11.0
image.png

Féllpz

unread,
Sep 17, 2019, 4:36:44 PM9/17/19
to kivy-...@googlegroups.com
Muito abrigado!!!! Graças as diversas dicas eu consegui compilar o APK, o erro estava no # (str) Application versioning (method 2), eu estava colocando a versão nele, quando troquei do method 1 e puis no method 2, ele compilou, muito obrigado!

Féllpz

unread,
Sep 17, 2019, 4:38:17 PM9/17/19
to kivy-...@googlegroups.com
Escrevi errado, eu troquei do method 2 e coloquei no method 1 

Reply all
Reply to author
Forward
0 new messages