kivy / buildozer

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

Buildozer not working #1785

Closed Bestwear0 closed 7 months ago

Bestwear0 commented 8 months ago

Im trying to build my kivy app to apk using buildozer in github push. This is my build.yml

name: CI
on:
  push:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Get Date
        id: get-date
        run: |
          echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
        shell: bash

      - name: Cache Buildozer global directory
        uses: actions/cache@v2
        with:
          path: .buildozer_global
          key: buildozer-global-${{ hashFiles('buildozer.spec') }}

      - uses: actions/cache@v2
        with:
          path: .buildozer
          key: ${{ runner.os }}-${{ steps.get-date.outputs.date }}-${{ hashFiles('buildozer.spec') }}

      - name: Install AIDL
        run: |
          sudo apt-get update
          sudo apt-get install build-essential
          sudo apt-get install libstdc++6
          sudo apt-get install aidl
          pip3 install httplib2 pyasn1 pyasn1-modules rsa six
          pip3 install gcloud oauth2client pycryptodome python-jwt requests requests-toolbelt
          pip3 install pyparsing jws

      - name: Build with Buildozer
        uses: ArtemSBulgakov/buildozer-action@v1
        id: buildozer
        with:
          command: buildozer android debug
          buildozer_version: master      

      - name: Upload artifacts
        uses: actions/upload-artifact@v2
        with:
          name: package
          path: ${{ steps.buildozer.outputs.filename }}

But I'm getting an error


kivy/core/image/_img_sdl2.pyx:17:94: Syntax error in C variable declaration

  STDERR:

# Command failed: ('/bin/python3', '-m', 'pythonforandroid.toolchain', 'create', '--dist_name=myapp', '--bootstrap=sdl2', '--requirements=python3==3.9.7,hostpython3==3.9.7,kivy,kivymd,certifi,pillow,pyrebase==3.0.27,requests==2.11.1,urllib3,chardet,idna,pillow,oauth2client==3.0.0,httplib2==0.22.0,pyparsing==2.4.7,pyasn1==0.5.0,pyasn1_modules==0.3.0,virtualenv,six==1.16.0,rsa==4.9,requests-toolbelt==0.7.0,python-jwt==2.0.1,pygments,pycryptodome==3.4.3,ptyprocess,protobuf==4.23.0,jws==0.1.3,googleapis-common-protos==1.59.0,gcloud==0.17.0,future,jwcrypto,cryptography,Deprecated,wrapt', '--arch=arm64-v8a', '--arch=armeabi-v7a', '--copy-libs', '--color=always', '--storage-dir=/github/workspace/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a', '--ndk-api=21', '--ignore-setup-py', '--debug')
# Error code: 1
# ENVIRONMENT:
#     GITHUB_STATE = '/github/file_commands/save_state_2383d81f-20b2-4066-9ca6-4b0c5d11d8fb'
#     ACTIONS_RUNTIME_TOKEN = '***'
#     ACTIONS_CACHE_URL = 'https://acghubeus1.actions.githubusercontent.com/0MABqxV1Ej8oF8A2I7V2eVimQNghW1ygRYQcu5gXKXpI5fZaVJ/'
#     USER = 'user'
#     LANGUAGE = 'en_US.UTF-8'
#     CI = 'true'
#     HOSTNAME = '07867b7e5df0'
#     GITHUB_ENV = '/github/file_commands/set_env_2383d81f-20b2-4066-9ca6-4b0c5d11d8fb'
#     RUNNER_ENVIRONMENT = 'github-hosted'
#     WORK_DIR = '/home/user/hostcwd'
#     HOME = '/home/user'
#     SRC_DIR = '/home/user/src'
#     RUNNER_TEMP = '/home/runner/work/_temp'
#     GITHUB_EVENT_PATH = '/github/workflow/event.json'
#     GITHUB_REPOSITORY_OWNER = 'Bestwear0'
#     PYTHONUNBUFFERED = '1'
#     GITHUB_RETENTION_DAYS = '90'
#     GITHUB_REPOSITORY_OWNER_ID = '150575066'
#     GITHUB_HEAD_REF = ''
#     GITHUB_GRAPHQL_URL = 'https://api.github.com/graphql'
#     HOME_DIR = '/home/user'
#     BUILDOZER_WARN_ON_ROOT = '0'
#     GITHUB_API_URL = 'https://api.github.com'
#     ACTIONS_RUNTIME_URL = 'https://pipelinesghubeus6.actions.githubusercontent.com/0MABqxV1Ej8oF8A2I7V2eVimQNghW1ygRYQcu5gXKXpI5fZaVJ/'
#     RUNNER_OS = 'Linux'
#     GITHUB_WORKFLOW = 'CI'
#     APP_ANDROID_ACCEPT_SDK_LICENSE = '1'
#     GITHUB_RUN_ID = '8170653652'
#     GITHUB_WORKFLOW_SHA = '0aa0baaa3098947cd1c2712fe1cb0d9fca3c8a5f'
#     GITHUB_REF_TYPE = 'branch'
#     GITHUB_BASE_REF = ''
#     GITHUB_ACTION_REPOSITORY = 'ArtemSBulgakov/buildozer-action'
#     GITHUB_WORKFLOW_REF = 'Bestwear0/BestWear/.github/workflows/build.yml@refs/heads/main'
#     PATH = '/github/workspace/./.buildozer_global/android/platform/apache-ant-1.9.4/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
#     RUNNER_TOOL_CACHE = '/opt/hostedtoolcache'
#     GITHUB_TRIGGERING_ACTOR = 'Bestwear0'
#     GITHUB_ACTION = 'buildozer'
#     GITHUB_RUN_NUMBER = '7'
#     RUNNER_ARCH = 'X64'
#     LANG = 'en_US.UTF-8'
#     GITHUB_REF_NAME = 'main'
#     RUNNER_NAME = 'GitHub Actions 4'
#     GITHUB_REPOSITORY = 'Bestwear0/BestWear'
#     INPUT_WORKDIR = '.'
#     GITHUB_ACTION_REF = 'v1'
#     GITHUB_REPOSITORY_ID = '717657740'
#     GITHUB_ACTIONS = 'true'
#     GITHUB_REF_PROTECTED = 'false'
#     BUILDOZER_BIN = './bin'
#     GITHUB_WORKSPACE = '/github/workspace'
#     GITHUB_JOB = 'build'
#     INPUT_COMMAND = 'buildozer android debug'
#     ACTIONS_RESULTS_URL = 'https://results-receiver.actions.githubusercontent.com/'
#     BUILDOZER_BUILD_DIR = './.buildozer'
#     GITHUB_RUN_ATTEMPT = '1'
#     GITHUB_SHA = '0aa0baaa3098947cd1c2712fe1cb0d9fca3c8a5f'
#     GITHUB_REF = 'refs/heads/main'
#     GITHUB_ACTOR = 'Bestwear0'
#     INPUT_BUILDOZER_VERSION = 'master'
#     RUNNER_WORKSPACE = '/home/runner/work/BestWear'
#     GITHUB_ACTOR_ID = '150575066'
#     GITHUB_PATH = '/github/file_commands/add_path_2383d81f-20b2-4066-9ca6-4b0c5d11d8fb'
#     LC_ALL = 'en_US.UTF-8'
#     PWD = '/github/workspace'
#     GITHUB_SERVER_URL = 'https://github.com'
#     GITHUB_OUTPUT = '/github/file_commands/set_output_2383d81f-20b2-4066-9ca6-4b0c5d11d8fb'
#     GITHUB_EVENT_NAME = 'push'
#     INPUT_REPOSITORY_ROOT = '.'
#     GITHUB_STEP_SUMMARY = '/github/file_commands/step_summary_2383d81f-20b2-4066-9ca6-4b0c5d11d8fb'
#     PACKAGES_PATH = '/github/workspace/./.buildozer_global/android/packages'
#     ANDROIDSDK = '/github/workspace/./.buildozer_global/android/platform/android-sdk'
#     ANDROIDNDK = '/github/workspace/./.buildozer_global/android/platform/android-ndk-r25b'
#     ANDROIDAPI = '33'
#     ANDROIDMINAPI = '21'
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
Traceback (most recent call last):
  File "/action/entrypoint.py", line 159, in <module>
    main()
  File "/action/entrypoint.py", line 27, in main
    run_command(env["INPUT_COMMAND"])
  File "/action/entrypoint.py", line 135, in run_command
    retcode = subprocess.check_call(command, shell=True)
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'buildozer android debug' returned non-zero exit status 1.```
github-actions[bot] commented 7 months ago

👋 @Bestwear0, Sorry to hear you are having difficulties with Kivy's Buildozer; Kivy unites a number of different technologies, so building apps can be temperamental. We try to use GitHub issues only to track work for developers to do to fix bugs and add new features to Buildozer. This issue has been closed, because it doesn't describe a bug or new feature request for Buildozer. There is a mailing list and a Discord channel to support Kivy users debugging their own systems, which should be able to help. They are linked in the ReadMe. Of course, if it turns out you have stumbled over a bug in Buildozer, we do want to hear about it here. The support channels should be able to help you craft an appropriate bug report.