Traceback (most recent call last):
File "/usr/local/bin/buildozer", line 11, in <module>
sys.exit(main())
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 987, in run_command
self.target.run_commands(args)
File "/usr/local/lib/python2.7/dist-packages/buildozer/target.py", line 85, in run_commands
func(args)
File "/usr/local/lib/python2.7/dist-packages/buildozer/target.py", line 97, in cmd_debug
self.buildozer.build()
File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 198, in build
self.target.build_package()
File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android.py", line 730, in build_package
copyfile(join(dist_dir, 'bin', apk), join(self.buildozer.bin_dir, apk))
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: "/home/andrew/CODE/Python/kivy-test-android/.buildozer/android/platform/python-for-android/dist/helloworld/bin/HelloWorld-'1.0'-debug.apk"
the problem is : in toolchain.py has two build_type ,gradle(build_tools_version>25.0 and exist gradlew) otherwise ant. but in android.py, only jude exist gradlew but the default build_tools_version is 19.1. Fix it: /usr/local/lib/python2.7/dist-packages/buildozer/tagets/android.py,: (1) at file top insert : from distutils.version import LooseVersion (2) line 786 replace with below code:
Can someone just push this fix in? I had to do this hack 4 months ago, and I had to do it again on a new build : (
the problem is : in toolchain.py has two build_type ,gradle(build_tools_version>25.0 and exist gradlew) otherwise ant. but in android.py, only jude exist gradlew but the default build_tools_version is 19.1. Fix it: /usr/local/lib/python2.7/dist-packages/buildozer/tagets/android.py,: (1) at file top insert : from distutils.version import LooseVersion (2) line 786 replace with below code:
Hi cdyangbo; I think the line should be number: (2) line 789
After taking a closer look, it looks like a slightly different issue. I see:
[INFO]: # Found APK file: /path/to/my/appdir/.buildozer/android/platform/build/dists/myapp/bin/myapp-0.1-debug.apk
And the path that is causing the problem is:
/path/to/my/appdir/.buildozer/android/platform/build/dists/myapp/build/outputs/apk/myapp-debug.apk
This is because
/path/to/my/appdir/.buildozer/android/platform/build/dists/myapp/build
does not exist.Is this the same issue or a new one?
the problem is : in toolchain.py has two build_type ,gradle(build_tools_version>25.0 and exist gradlew) otherwise ant. but in android.py, only jude exist gradlew but the default build_tools_version is 19.1. Fix it: /usr/local/lib/python2.7/dist-packages/buildozer/tagets/android.py,: (1) at file top insert : from distutils.version import LooseVersion (2) line 786 replace with below code:
works fine! Thanks a lot
Hi @metulburr I found “android.py” in “/home/ratnesh/anaconda3/lib/python3.6/site-packages/buildozer-0.35.dev0-py3.6.egg/buildozer/targets”
Basically it is in lib folder of your default Python where python packages get installed. So manually search “android.py” in this folder.
@cdyangbo solved for me. Thanks.
Thanks for the quick answer! I solved it by replacing my
android.py
file with this one pushed three days ago: #597This change fixed it for me
But this is absolutely a hack, there must be a better way to check what kind of build was run and what kind of APK name was generated. (This is all on python 2.7 btw)
I am getting this error also. The file exists but the wrong name for the file in being given in the copy task.
However the APK is clearly in the directory.
I have not changed by build script, pretty sure this is due to recent buildozer update.
same issue for me works this edit buildozer.spec [buildozer] build_dir = /build/yourapp