Checklist
Versions
- Python: 3.13.1
- OS: Fedora 41
- Kivy: 2.3.1
- Cython: 3.0.11
- OpenJDK: 23.0.1.0.11
Description
Ran buildozer android debug
Got an AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? regarding gradlew._path being str.
[INFO]: Detected highest available build tools version to be 34.0.0
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1257, in <module>
main()
~~~~^^
File "/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
~~~~~~~~~~~^^
File "/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 685, in __init__
getattr(self, command)(args)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 105, in wrapper_func
func(self, args, **kw)
~~~~^^^^^^^^^^^^^^^^^^
File "/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1119, in apk
output, build_args = self._build_package(args, package_type='apk')
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1037, in _build_package
sh.Command('dos2unix'), gradlew._path.decode('utf8'),
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Replaced /.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py line 1037 with this and it seemed to work -
try:
output = shprint(
sh.Command('dos2unix'), gradlew._path.decode('utf8'),
_tail=20, _critical=True, _env=env
)
except AttributeError:
output = shprint(
sh.Command('dos2unix'), gradlew._path,
_tail=20, _critical=True, _env=env
)
It follows with some gradle errors. Doesn't seem related, but will need more investigation at a separate time.
> Task :compressDebugAssets FAILED
[DEBUG]:
[DEBUG]: FAILURE: Build failed with an exception.
[DEBUG]:
[DEBUG]: * What went wrong:
[DEBUG]: Execution failed for task ':compressDebugAssets'.
[DEBUG]: > A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction
[DEBUG]: > Java heap space
Checklist
p4a.branch = develop)Versions
Description
Ran
buildozer android debugGot an
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?regardinggradlew._pathbeingstr.Replaced
/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.pyline 1037 with this and it seemed to work -It follows with some gradle errors. Doesn't seem related, but will need more investigation at a separate time.