kivy / buildozer

Generic Python packager for Android and iOS
https://buildozer.readthedocs.io
MIT License
1.75k stars 503 forks source link

Gradle error (end of line ?) on WSL with Ubuntu 22.04 #1864

Open pmcstjean opened 1 month ago

pmcstjean commented 1 month ago

Versions

Description

I am trying to build an app and receive the following gradle error

[DEBUG]:   -> running gradlew clean assembleDebug
[DEBUG]:        /usr/bin/env: ‘bash\r’: No such file or directory
Exception in thread background thread for pid 166636:

which eventually lead to the failing error

[WARNING]: ERROR: /home/pmc/KivyBuilds/Section_02/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/KivyUdemy/gradlew failed!
No setup.py/pyproject.toml used, copying full private data into .apk.
Applying Java source code patches...
Applying patch: src/patches/SDLActivity.java.patch
Warning: failed to apply patch (exit code 1), assuming it is already applied:  src/patches/SDLActivity.java.patch
# Command failed: ['/usr/bin/python3', '-m', 'pythonforandroid.toolchain', 'apk', '--bootstrap', 'sdl2', '--dist_name', 'KivyUdemy', '--name', 'Section_02', '--version', '0.1', '--package', 'org.test.kivyudemy', '--minsdk', '21'
, '--ndk-api', '21', '--private', '/home/pmc/KivyBuilds/Section_02/.buildozer/android/app', '--android-entrypoint', 'org.kivy.android.PythonActivity', '--android-apptheme', '@android:style/Theme.NoTitleBar', '--orientation', 'po
rtrait', '--window', '--enable-androidx', '--copy-libs', '--arch', 'arm64-v8a', '--arch', 'armeabi-v7a', '--color=always', '--storage-dir=/home/pmc/KivyBuilds/Section_02/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a', '--ndk-api=21', '--ignore-setup-py', '--debug']

buildozer.spec

Command:

buildozer android debug

Spec file: a vanille file generated by buildozer init