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 actual error is probable a bit before the log you pasted please paste
the full log.
On Sat, Apr 2, 2016 at 12:45 AM, Andrew E. Titov [email protected]
wrote:
Traceback (most recent call last):
File "/usr/local/bin/buildozer", line 11, in
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"—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/kivy/buildozer/issues/312
It looks like you've added quotes around the version number in your buildozer.spec file. Quotes are not needed in the spec file.
Instead of this:
version = '1.0'
use this:
version = 1.0
Hello, it seems that I have the same error, I checked I have version written the right way.
Here is the log:
[DEBUG]: BUILD SUCCESSFUL
[DEBUG]: Total time: 2 seconds
[INFO]: <- directory context /home/ge/runway/examples/.buildozer/android/platform/python-for-android-master
[INFO]: # Copying APK to current directory
[INFO]: # Found APK file: /home/ge/runway/examples/.buildozer/android/platform/build/dists/kivycrash/bin/Hello-0.1-debug.apk
[DEBUG]: -> running cp /home/ge/runway/examples/.buildozer/android/platform/build/dists/kivycrash/bin/Hello-0.1-debug.apk ./
WARNING: Received a --sdk argument, but this argument is deprecated and does nothing.
Traceback (most recent call last):
File "/usr/local/bin/buildozer", line 11, in
load_entry_point('buildozer==0.34.dev0', 'console_scripts', 'buildozer')()
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.34.dev0-py2.7.egg/buildozer/scripts/client.py", line 13, in main
Buildozer().run_command(sys.argv[1:])
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.34.dev0-py2.7.egg/buildozer/__init__.py", line 1058, in run_command
self.target.run_commands(args)
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.34.dev0-py2.7.egg/buildozer/target.py", line 91, in run_commands
func(args)
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.34.dev0-py2.7.egg/buildozer/target.py", line 103, in cmd_debug
self.buildozer.build()
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.34.dev0-py2.7.egg/buildozer/__init__.py", line 212, in build
self.target.build_package()
File "/usr/local/lib/python2.7/dist-packages/buildozer-0.34.dev0-py2.7.egg/buildozer/targets/android.py", line 808, 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/ge/runway/examples/.buildozer/android/platform/build/dists/kivycrash/build/outputs/apk/kivycrash-debug.apk'
I would like to get some help,
Thank you.
same issue
for me works this
edit buildozer.spec
[buildozer]
build_dir = /build/yourapp
I am getting this error also. The file exists but the wrong name for the file in being given in the copy task.
Traceback (most recent call last):
File "/usr/local/bin/buildozer", line 9, 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/freshollie/Documents/Repos/cashpassport-tracker/.buildozer/android/platform/build/dists/cashpassporttracker/build/outputs/apk/cashpassporttracker-debug.apk'
However the APK is clearly in the directory.
freshollie@freshollie-desktop:~$ ls /home/freshollie/Documents/Repos/cashpassport-tracker/.buildozer/android/platform/build/dists/cashpassporttracker/bin
AndroidManifest.xml CashPassportTrackerService-0.4.1.ap_ CashPassportTrackerService-0.4.1-debug-unaligned.apk classes.dex proguard.txt rsObj
AndroidManifest.xml.d CashPassportTrackerService-0.4.1.ap_.d CashPassportTrackerService-0.4.1-debug-unaligned.apk.d classes.dex.d res
build.prop CashPassportTrackerService-0.4.1-debug.apk classes dexedLibs rsLibs
I have not changed by build script, pretty sure this is due to recent buildozer update.
Are you using the latest buildozer, which was released very recently?
Yes, I installed my dependencies tonight. I am guessing this error has something to do with https://github.com/kivy/buildozer/commit/83ad94d6260cf6cb34711d27a224dbca97ec1c20
Edit:
My spec: https://github.com/freshollie/cashpassport-tracker/blob/master/buildozer.spec
Delving deeper into the issue. It seems is_gradle_build is being triggered because there are gradle files in the build directory of buildozer, but ant is being used to build the APK, because it's name conforms to the ant structure?
This change fixed it for me
```
ant_files = ["build.xml", "ant.propeties"]
is_ant_build = any((
exists(join(dist_dir, x)) for x in ant_files))
if not is_ant_build:
....
```
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 have the same problem after update my buildozer. Looks like there is a bug in 0.34 version. I've returned to 0.33.
I'm running into this too, both with 0.33 and 0.34 versions.
@freshollie Would you care to elaborate exactly how to apply your hack? I'm running into the same issue... at first it seemed natural that those changes should be applied to targets/android.py in lines inside build_package(self), but I don't quite understand the logic of the hack (I don't see is_ant_build used anywhere) nor the precise place the code should be pasted.
Cheers
@sabian2008
Yes, in target/android.py starting with the line
# XXX found how the apk name is really built from the title
gradle_files = ["build.gradle", "gradle", "gradlew"]
is_gradle_build = any((
exists(join(dist_dir, x)) for x in gradle_files))
if is_gradle_build:
Thanks for the quick answer! I solved it by replacing my android.py file with this one pushed three days ago: #597
I got this error after the "BUILD SUCCESSFUL" message. Can anyone help me out to resolve this error!
Traceback (most recent call last):
File "/usr/local/bin/buildozer", line 11, in
load_entry_point('buildozer==0.35.dev0', '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/aurum305/Documents/KIVY/.buildozer/android/platform/build/dists/myapp/build/outputs/apk/myapp-debug.apk'
@Nivya-V this is the same error we are getting. The APK builds, but the program tries to fetch an APK with the wrong name to copy into the bin directory. Follow the instructions above to fix your local buildozer source. Not sure if a patch has been distributed for this yet.
@freshollie Thanks for the time to reply(:
Can we create a IOS app from ubuntu machine using Kivy.
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:
XXX found how the apk name is really built from the title
__sdk_dir = self.android_sdk_dir
build_tools_versions = os.listdir(join(__sdk_dir, 'build-tools'))
build_tools_versions = sorted(build_tools_versions, key=LooseVersion)
build_tools_version = build_tools_versions[-1]
gradle_files = ["build.gradle", "gradle", "gradlew"]
is_gradle_build = any((exists(join(dist_dir, x)) for x in gradle_files)) and build_tools_version >= '25.0'
@cdyangbo #312
@cdyangbo solved for me. Thanks.
i am getting this problem too. But i am not sure scanning here what is the hack to fix it?
Where is target/android.py?
Hi cdyangbo;
I think the line should be number: (2) line 789
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:
XXX found how the apk name is really built from the title
__sdk_dir = self.android_sdk_dir
build_tools_versions = os.listdir(join(__sdk_dir, 'build-tools'))
build_tools_versions = sorted(build_tools_versions, key=LooseVersion)
build_tools_version = build_tools_versions[-1]
gradle_files = ["build.gradle", "gradle", "gradlew"]
is_gradle_build = any((exists(join(dist_dir, x)) for x in gradle_files)) and build_tools_version >= '25.0'
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.
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:
XXX found how the apk name is really built from the title
__sdk_dir = self.android_sdk_dir
build_tools_versions = os.listdir(join(__sdk_dir, 'build-tools'))
build_tools_versions = sorted(build_tools_versions, key=LooseVersion)
build_tools_version = build_tools_versions[-1]
gradle_files = ["build.gradle", "gradle", "gradlew"]
is_gradle_build = any((exists(join(dist_dir, x)) for x in gradle_files)) and build_tools_version >= '25.0'
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:
XXX found how the apk name is really built from the title
__sdk_dir = self.android_sdk_dir
build_tools_versions = os.listdir(join(__sdk_dir, 'build-tools'))
build_tools_versions = sorted(build_tools_versions, key=LooseVersion)
build_tools_version = build_tools_versions[-1]
gradle_files = ["build.gradle", "gradle", "gradlew"]
is_gradle_build = any((exists(join(dist_dir, x)) for x in gradle_files)) and build_tools_version >= '25.0'
works fine!
Thanks a lot
I have the same error, I modified android.py and I could build without problem.
thanks!
"Permission denied" when trying to save the android.py script.
How do i get the permission?
EDIT: Never mind that, edited from the terminal. But, when i try to run buildozer android debug, this error shows up:
Traceback (most recent call last):
File "/usr/local/bin/buildozer", line 11, in
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 1052, in run_command
targets = [x[0] for x in self.targets()]
File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 944, in targets
fromlist=['buildozer'])
File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android_new.py", line 10, in
from buildozer.targets.android import TargetAndroid
File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android.py", line 811
else:
^
SyntaxError: invalid syntax
use sudo gedit android.py
On Thu, Feb 8, 2018 at 3:21 PM, azadbekm notifications@github.com wrote:
"Permission denied" when trying to save the android.py script.
How do i get the permission?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/kivy/buildozer/issues/312#issuecomment-364058160, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AGK1NLWPuqK5go54gtgKKt5PTNe9ZIDeks5tSsMegaJpZM4H99Wj
.
@cdyangbo solved for me. Thanks.
This is still an issue for me (latest version, updated a few hours ago).
Changing the android.py file didn't seem to work, although I am not exactly certain I changed it correctly (is there a modified version I can download from somewhere?)
Was issue this resolved?
This is still an issue for me as well - however the suggested hack seems to have made its way into version 0.35? It doesn't fix the problem.
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?
@jakewilliamson88 Are you sure it does not exist? Are you aware that the .buildozer folder will be hidden, and so not displayed by default by some file browsers? What part of the path does exist?
Sorry - what I wrote wasn't quite clear. The build directory does not exist in /path/to/my/appdir/.buildozer/android/platform/build/dists/myapp/
Here is the ls -la from the path above:
drwxrwxr-x 13 jake jake 4096 Mar 14 19:43 .
drwxrwxr-x 3 jake jake 4096 Mar 14 19:26 ..
-rw-rw-r-- 1 jake jake 2184 Mar 14 19:43 AndroidManifest.xml
-rw-rw-r-- 1 jake jake 804 Mar 14 19:26 ant.properties
drwxrwxr-x 7 jake jake 4096 Mar 14 19:43 bin
-rw-rw-r-- 1 jake jake 1424 Mar 14 19:27 blacklist.txt
-rw-rw-r-- 1 jake jake 705 Mar 14 19:43 build.gradle
-rwxrwxr-x 1 jake jake 19814 Mar 14 19:26 build.py
-rw-rw-r-- 1 jake jake 16972 Mar 14 19:27 build.pyc
-rw-rw-r-- 1 jake jake 4022 Mar 14 19:43 build.xml
drwxrwxr-x 2 jake jake 16384 Mar 14 19:26 collated_objects
-rw-rw-r-- 1 jake jake 497 Mar 14 19:43 custom_rules.xml
-rw-rw-r-- 1 jake jake 189 Mar 14 19:27 dist_info.json
drwxrwxr-x 3 jake jake 4096 Mar 14 19:27 gen
-rw-rw-r-- 1 jake jake 308 Mar 14 19:26 .gitignore
drwxrwxr-x 3 jake jake 4096 Mar 14 19:26 gradle
-rwxrwxr-x 1 jake jake 5080 Mar 14 19:26 gradlew
-rw-rw-r-- 1 jake jake 2404 Mar 14 19:26 gradlew.bat
drwxrwxr-x 7 jake jake 4096 Mar 14 19:27 jni
drwxrwxr-x 3 jake jake 4096 Mar 14 19:26 libs
-rw-rw-r-- 1 jake jake 61 Mar 14 19:27 local.properties
drwxrwxr-x 3 jake jake 4096 Mar 14 19:26 obj
drwxrwxr-x 4 jake jake 4096 Mar 14 19:27 private
-rw-rw-r-- 1 jake jake 18 Mar 14 19:43 project.properties
drwxr-xr-x 6 jake jake 4096 Mar 14 19:22 python-install
drwxrwxr-x 3 jake jake 4096 Mar 14 19:27 src
drwxrwxr-x 2 jake jake 4096 Mar 14 19:27 templates
-rw-rw-r-- 1 jake jake 0 Mar 14 19:43 whitelist.txt
Oh, I think this is the opposite of the original issue - is your apk in the bin directory from that set of paths, by any chance?
Yes, it is.
ls -la of /path/to/my/appdir/.buildozer/android/platform/build/dists/myapp/bin:
total 40792
drwxrwxr-x 7 jake jake 4096 Mar 14 19:43 .
drwxrwxr-x 13 jake jake 4096 Mar 14 19:43 ..
-rw-rw-r-- 1 jake jake 2184 Mar 14 19:43 AndroidManifest.xml
-rw-rw-r-- 1 jake jake 212 Mar 14 19:43 AndroidManifest.xml.d
-rw-rw-r-- 1 jake jake 179 Mar 14 19:43 build.prop
drwxrwxr-x 3 jake jake 4096 Mar 14 19:27 classes
-rw-rw-r-- 1 jake jake 76932 Mar 14 19:43 classes.dex
-rw-rw-r-- 1 jake jake 7794 Mar 14 19:43 classes.dex.d
drwxrwxr-x 2 jake jake 4096 Mar 14 19:27 dexedLibs
-rw-rw-r-- 1 jake jake 5574404 Mar 14 19:43 myapp-0.1.ap_
-rw-rw-r-- 1 jake jake 2249 Mar 14 19:43 myapp-0.1.ap_.d
-rw-rw-r-- 1 jake jake 7503887 Mar 14 19:43 myapp-0.1-debug.apk
-rw-rw-r-- 1 jake jake 7503878 Mar 14 19:43 myapp-0.1-debug-unaligned.apk
-rw-rw-r-- 1 jake jake 1006 Mar 14 19:43 myapp-0.1-debug-unaligned.apk.d
-rw-rw-r-- 1 jake jake 5680097 Mar 14 19:27 MyApplication-0.1.ap_
-rw-rw-r-- 1 jake jake 2257 Mar 14 19:27 MyApplication-0.1.ap_.d
-rw-rw-r-- 1 jake jake 7609577 Mar 14 19:27 MyApplication-0.1-debug.apk
-rw-rw-r-- 1 jake jake 7609569 Mar 14 19:27 MyApplication-0.1-debug-unaligned.apk
-rw-rw-r-- 1 jake jake 1022 Mar 14 19:27 MyApplication-0.1-debug-unaligned.apk.d
-rw-rw-r-- 1 jake jake 103 Mar 14 19:43 proguard.txt
drwxrwxr-x 7 jake jake 4096 Mar 14 19:27 res
drwxrwxr-x 2 jake jake 4096 Mar 14 19:43 rsLibs
drwxrwxr-x 2 jake jake 4096 Mar 14 19:43 rsObj
@inclement Should I create a new issue for this? Or is it best to leave it here?
I am facing a similar problem like @jakewilliamson88
# Found APK file: path/to/project/.buildozer/android/platform/build/dists/kivycrash2/bin/kivycrash2-0.1-debug.apk
And the error is:
FileNotFoundError: [Errno 2] No such file or directory: 'path/to/project/.buildozer/android/platform/build/dists/kivycrash2/build/outputs/apk/kivycrash2-debug.apk'
The only difference i see is the project version is missing in the error, any idea?
I'm getting something very similar.
the error I'm getting is:
FileNotFoundError: [Errno 2] No such file or directory: 'path/to/app/.buildozer/android/platform/build/dists/myapp/build/outputs/apk/myapp-debug.apk
I have apk files in my path/to/app/.buildozer/android/platform/build/dists/myapp/bin directory
but I cant figure out how to point buildozer at the correct files. It looks like the problem arises around line 817 in the android.py file. Out of curiosity, can anybody else tell me what the value of their is_gradle_build is? It's declared on line 791.
Are there any plans to address this any time soon? I'd hate to add a hack in just for a fix to be released the very next day.
@cdyangbo 's solution worked for me. Thanks.
@baznr What version are you using? The last I checked it looked like that solution made it into the latest version, which did not work for me. Perhaps I've made a mistake?
@jakewilliamson88 pay attention to the lines to substitute on the step #2.
The lines to take off are until the [if] statement (you can easily realize, if you compare the new code with the old one).
BTW, I use the latest version 1.10.0
had same issue ...
the apk in this bin directory before beeing copied can be used ? Or there are other scripts to be run after ?
Hi everyone!
Same issue here. Latest version of everything, using Crystax (if it changes anything, witch apparently isn't the case). Any possibly fix coming out, or should I just hack it as stated above? Thx!
hi
applying the hack is fixing the issue.
rgds
2018-04-15 5:12 GMT+08:00 dfrison01 notifications@github.com:
Hi everyone!
Same issue here. Latest versions of everything, using Crystax (if i
changes anything, witch apparently isn't the case). Any possibly fix coming
out, or should I just hack it as stated above? Thx!—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/kivy/buildozer/issues/312#issuecomment-381360814, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AjV4ajHNDtjYi-olz4SAr6DoB4PYHz2uks5tomYigaJpZM4H99Wj
.
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 : (
Hi,
Applying the hack is fixing the issue.
Plz someone push the fix in.
Hi,
I am using python3 version and i have replaced line with
'''
XXX found how the apk name is really built from the title
__sdk_dir = self.android_sdk_dir
build_tools_versions = os.listdir(join(__sdk_dir, 'build-tools'))
build_tools_versions = sorted(build_tools_versions, key=LooseVersion)
build_tools_version = build_tools_versions[-1]
gradle_files = ["build.gradle", "gradle", "gradlew"]
is_gradle_build = any((exists(join(dist_dir, x)) for x in gradle_files)) and build_tools_version >= '25.0'
'''
but still not working for me ..
android.py path : /usr/local/lib/python3.4/dist-packages/buildozer/targets/android.py
@cdyangbo
I can't edite android.py :( thanks for replying
Missing build mode when create apk_dir
It seems that having changed p4a has raised FileNotFoundError again.
And in android.py, I change:
apk_dir = join(dist_dir, "build", "outputs", "apk")
to:
apk_dir = join(dist_dir, "build", "outputs", "apk", mode)
It all work again.
I'm not sure that this variable used correctly or not, anyone knows how to fix this?
@Thong-Tran I know it looks very similar, but what you saw and your fix is something pretty recent and not rely what the original bug was about.
It used to work OK without the mode fix like few days ago and I just saw that failing today and also had to add the mode as you did to fix it.
Edit: the regression might have been introduced here: https://github.com/kivy/python-for-android/pull/1507
@AndreMiras, are you find the way to completely fix this?
When I build unsigned release, this will raise again because folder is 'release' not 'release-unsigned'.
The bugfix for the mode was merged to master in https://github.com/kivy/buildozer/pull/766
The problem you have with the release is different and you can try to find help in discord support channel, not in the bug tracker.
I solved this issue by installing a different version of buildozer e.g
sudo pip install buildozer==0.36
Most helpful comment
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: