Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build apk : error can not find the build/output folder #647

Closed
ghost opened this issue Apr 5, 2018 · 1 comment
Closed

build apk : error can not find the build/output folder #647

ghost opened this issue Apr 5, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 5, 2018

dears,

this is my first try to use builodzer.
I'm using the standard way, explained in the doc, using the VM proposed by Kivy and VirtualBox.

Buildozer init is ok
then run the command sudo buildozer android debug in the VM folder where I have copied my main.py file

Many steps were OK, but seems the last one failed with error :
No such file or directory: u'/home/kivy/myapps/.buildozer/android/platform/build/dists/myfirstapk/build/outputs/apk/myfirstapk-debug.apk'

were myfirstapk is the name of the apps given in the buildozer.spec file (see below)

the command that failed is running cp /home/kivy/myapps/.buildozer/android/platform/build/dists/myfirstapk/bin/Myfirsttestapk-0.1-debug.apk ./ , which seems to be the final step to copy the apk in the source folder of my app.

actually there a file Myfirsttestapk-0.1-debug.apk in this folder /home/kivy/myapps/.buildozer/android/platform/build/dists/myfirstapk/bin

Is this apk with "debug" in the name can be used or it is not finalized ?

then why the error is refering to the folder IOError: [Errno 2] No such file or directory: u'/home/kivy/myapps/.buildozer/android/platform/build/dists/myfirstapk/build/outputs/apk/myfirstapk-debug.apk' wich doesnt exist at all ???

please help, I've been facing this for the whole day

Rgds

main.py:

import kivy
from kivy.app import App
from kivy.uix.button import Button
from kivy.properties import NumericProperty

class TheClick(App):
	count = NumericProperty(0)
	def build(self):
		self.bind(count = self.update_widg)
		self.btn = Button(text = 'click here', font_size = 150)
	
		self.btn.bind(on_press=self.increment)
		return self.btn

	def increment(self, button):
	    self.count+=1

	def update_widg(self,app,value):
		self.btn.text = "click here {}".format(self.count)

if __name__=="__main__":
	TheClick().run()

error log:

[DEBUG]:   	BUILD SUCCESSFUL
[DEBUG]:   	Total time: 5 seconds
[INFO]:    <- directory context /home/kivy/myapps/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    # Copying APK to current directory
[INFO]:    # Found APK file: /home/kivy/myapps/.buildozer/android/platform/build/dists/myfirstapk/bin/Myfirsttestapk-0.1-debug.apk
[DEBUG]:   -> running cp /home/kivy/myapps/.buildozer/android/platform/build/dists/myfirstapk/bin/Myfirsttestapk-0.1-debug.apk ./
Traceback (most recent call last):
  File "/usr/local/bin/buildozer", line 11, in <module>
    load_entry_point('buildozer==0.34', 'console_scripts', 'buildozer')()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/scripts/client.py", line 13, in main
    Buildozer().run_command(sys.argv[1:])
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 1058, in run_command
    self.target.run_commands(args)
  File "/usr/local/lib/python2.7/dist-packages/buildozer/target.py", line 92, in run_commands
    func(args)
  File "/usr/local/lib/python2.7/dist-packages/buildozer/target.py", line 104, in cmd_debug
    self.buildozer.build()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 212, in build
    self.target.build_package()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android.py", line 817, in build_package
    copyfile(join(apk_dir, apk), join(self.buildozer.bin_dir, apk_dest))
  File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: u'/home/kivy/myapps/.buildozer/android/platform/build/dists/myfirstapk/build/outputs/apk/myfirstapk-debug.apk'

buildozer.spec

[app]
title = My first test apk
package.name = myfirstapk
package.domain = org.test
source.dir = .
source.include_exts = py,png,jpg,kv,atlas
requirements = kivy
version = 0.1
orientation = all
osx.python_version = 3
osx.kivy_version = 1.9.1
fullscreen = 0
android.arch = armeabi-v7a
log_level = 2
warn_on_root = 1
@inclement
Copy link
Member

Closing as stale, I believe this is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant