How to Convert your Kivy Apps to APK Using GitHub Actions | Step-by-Step Tutorial.

Поділитися
Вставка
  • Опубліковано 27 січ 2025

КОМЕНТАРІ • 60

  • @OuchenTech
    @OuchenTech  3 місяці тому +5

    Updated: 27/12/2024
    If you encounter issues during the build, such as # Aidl not found or # Unable to locate package libtinfo5, in runs-on, replace ubuntu-latest with ubuntu-22.04.
    Here is the full code of build.yml:
    on:
    push:
    branches: [ main ]
    jobs:
    build:
    runs-on: ubuntu-22.04
    steps:
    - uses: actions/checkout@v4
    - name: Build APK
    uses: digreatbrian/buildozer-action@v2
    with:
    python-version: 3.8
    buildozer-cmd: buildozer -v android debug
    - name: Upload artifacts
    uses: actions/upload-artifact@v4
    with:
    name: package
    path: ./bin/*.apk

    • @MustafaKocaker-wm8yl
      @MustafaKocaker-wm8yl 3 місяці тому

      thanks

    • @solaldia5813
      @solaldia5813 2 місяці тому +1

      Hi it seems that i have the same problem and it's not working with the updated code : here's the log error
      Accept? (y/N): Skipping following packages as the license is not accepted:
      Android SDK Build-Tools 36-rc1
      The following packages can not be installed since their licenses or those of the packages they depend on were not accepted:
      build-tools;36.0.0-rc1
      [=======================================] 100% Computing updates...
      # Check that aidl can be executed
      # build-tools folder not found /home/runner/.buildozer/android/platform/android-sdk/build-tools
      # Search for Aidl
      ** # Aidl not found, please install it.**
      (And yes i have set the android.accept_sdk_license = True)
      If you have the time please let me know how to handle this issue
      Thanks

    • @OuchenTech
      @OuchenTech  2 місяці тому

      @@solaldia5813 Hi! Thanks for reaching out.
      I just ran a test using the same GitHub Actions (the updated code), and the APK was successfully generated without any errors. This suggests that the issue might not be with the GitHub Actions workflow itself but could be related to the configuration in the buildozer.spec file.
      Suggestions to Troubleshoot:
      1. Double-Check the GitHub Actions Workflow: Make sure you are using the exact build code from above or directly from the GitHub repository (use the GitHub link in the description section). Even a small change can cause issues.
      2. Verify Your buildozer.spec File:
      - Ensure that the buildozer.spec configurations are correct.
      - Make sure android.accept_sdk_license = True is set in your buildozer.spec.

    • @solaldia5813
      @solaldia5813 2 місяці тому

      @@OuchenTech Hi ! So I double checked and it was my mistake I didn’t uncomment the line accept_sdk_license = True
      I ran the workflow again and everything went smoothly
      Thank you for the video it’s clear and simple for windows user

    • @OuchenTech
      @OuchenTech  2 місяці тому +1

      @@solaldia5813 Hi! I'm glad to hear it worked out! No worries, it's easy to miss a small detail like that. I'm happy the workflow ran smoothly for you this time.
      If you have any more questions or run into any other issues, feel free to reach out. Happy coding!

  • @00ShiNoda
    @00ShiNoda 2 дні тому +1

    BROOO OMFG I've tried like everything for one week i checked every forum and asked chatgpt, gemini, copilot etc and nothing worked except your method! You are the man dude! Thank you!

    • @OuchenTech
      @OuchenTech  День тому +1

      Awesome! I'm really glad it worked for you

    • @00ShiNoda
      @00ShiNoda День тому

      @ Also, this is not related to this topic but seems like you're an expert on Kivy so maybe you'll have an idea :). After compiled my app, i've seen that it's crashing when it's trying to import Openai and Deep-translator libraries (only 2 libraries i need in my app). According to the logs, it seems like it can't find some parts of the modules. I mean it can initialize the module, but it can't call its submodules. You think this means that kivy is not compatible with these modules? (thanks in advance, subscribed btw)

    • @OuchenTech
      @OuchenTech  День тому +1

      @@00ShiNoda I think you're facing Android packaging problems with those libraries. This usually happens when installing complex libraries during a Kivy Android app build. Try modifying your GitHub Actions workflow to explicitly install dependencies before building. In build.yml do this:
      on:
      push:
      branches: [ main ]
      jobs:
      build:
      runs-on: ubuntu-22.04
      steps:
      - uses: actions/checkout@v4

      - name: Install dependencies
      run: |
      pip install openai deep-translator

      - name: Build APK
      uses: digreatbrian/buildozer-action@v2
      with:
      python-version: 3.8
      buildozer-cmd: buildozer -v android debug

      - name: Upload artifacts
      uses: actions/upload-artifact@v4
      with:
      name: package
      path: ./bin/*.apk

    • @00ShiNoda
      @00ShiNoda День тому

      @@OuchenTech it didn't work. But thanks anyway :)

    • @OuchenTech
      @OuchenTech  14 годин тому

      @@00ShiNoda Try posting this issue on the Kivy Discord server - there are many experienced developers there who might have encountered and solved similar packaging problems. They could help diagnose the exact cause of the library import failures.

  • @АртемийШаблинский
    @АртемийШаблинский Місяць тому +3

    Hello, I would like to thank you so much for the help! This is the most detailed review I've seen on this topic. Keep making these :)

  • @MustafaKocaker-wm8yl
    @MustafaKocaker-wm8yl 3 місяці тому +2

    I've been looking for this for 2 days, thank you very much +subscriber, +like

  • @flarex5473
    @flarex5473 2 дні тому +2

    im getting aidl not found error and i used the same .yml code u used in video from description. pls help

    • @00ShiNoda
      @00ShiNoda 2 дні тому

      Apparently he made an update in the comment section. Did you try it? Because it also didn't work for me at beginning but i used the code from his comment then it worked.

    • @OuchenTech
      @OuchenTech  День тому

      Please, check the updated build.yml in the "pinned" comment above

  • @FaxZiG
    @FaxZiG 4 місяці тому

    Nice Bro!!!😁

  • @gabbarjigaming7398
    @gabbarjigaming7398 Місяць тому

    Aidl not found

  • @MustafaKocaker-wm8yl
    @MustafaKocaker-wm8yl 3 місяці тому +1

    Hello, I am getting an error. Can you help me?

    • @MustafaKocaker-wm8yl
      @MustafaKocaker-wm8yl 3 місяці тому

      E: Unable to locate package libtinfo5
      Error: Process completed with exit code 100.

    • @MustafaKocaker-wm8yl
      @MustafaKocaker-wm8yl 3 місяці тому

      I've been trying for 2 days, please help me @OuchenTech

    • @OuchenTech
      @OuchenTech  3 місяці тому

      @@MustafaKocaker-wm8yl yes I faced the same issue.The issue seems tied to package availability on the version of Ubuntu being used.
      In build.yml: change "runs-on: ubuntu-latest" to "runs-on: ubuntu-22.04". This fixes the issue.

    • @MustafaKocaker-wm8yl
      @MustafaKocaker-wm8yl 3 місяці тому

      @@OuchenTech yes, problem solved, thank you

    • @MustafaKocaker-wm8yl
      @MustafaKocaker-wm8yl 3 місяці тому

      @@OuchenTech I am facing one more problem. When I ran the application, it was closing as soon as the screen appeared, so I made a few changes in the "buildozer.spec" file and now I'm trying again.

  • @gumalgamul
    @gumalgamul 3 місяці тому +1

    how you load image on script before and after being apk

    • @OuchenTech
      @OuchenTech  3 місяці тому

      which image?

    • @gumalgamul
      @gumalgamul 3 місяці тому

      load sprite game

    • @OuchenTech
      @OuchenTech  3 місяці тому

      @@gumalgamul Are you talking about game character sprites? I mean the images responsible for character movements like run, idle, jump etc

  • @pranavkt4733
    @pranavkt4733 4 місяці тому +1

    Hi, i'm getting # Aidl not found, please install it. error on workflow

    • @avinashengineering3272
      @avinashengineering3272 4 місяці тому

      Bro see in stack overflow

    • @OuchenTech
      @OuchenTech  4 місяці тому

      The error you're encountering is likely due to changes made in the action by the author. To fix this issue, update your build.yml file by following these steps:
      Go to the GitHub repository of the action (Use the link in the description)
      In the README file, locate the 'How to Use' section.
      Copy the provided example code and paste it into your build.yml.
      I made a test, and it works now with no errors. Always check for action updates before converting your app.

  • @zasmedia583
    @zasmedia583 3 місяці тому

    hi which files from a python/kivy project i need to upload into GitHub

    • @OuchenTech
      @OuchenTech  3 місяці тому +1

      Hi,
      You should upload all the files necessary for your app to run, as well as the files needed to convert the project into an APK.
      Here’s a general guideline of what you should include:
      1- Source Code Files:
      - Upload all .py (Python files) and .kv (Kivy language files) related to your project.
      2- Project-specific Files:
      - Any asset files such as images, fonts, sounds, or other media used in the project.
      - Custom data files (e.g., .json, .csv, .db) that your app needs.
      3-App Presplash and Icon:
      - presplash.png: The image used as the app's presplash screen.
      - icon.png: The image used as the app icon.
      4- Configuration File:
      - buildozer.spec: This file is necessary for converting your Kivy project into an APK (Android).
      5- GitHub Action File:
      - After uploading all the necessary files, you need to create a build.yml file for GitHub Actions. Copy the code from the Pinned comment above and paste it in your build.yml file. Once this file is created and saved, the APK conversion will start automatically.
      Please make sure to respect the structure of your project files. For example, keep asset files (images, fonts, etc.) in their respective folders, and ensure the buildozer.spec file is in the project root directory.
      Also, don’t forget to watch the video from the beginning, as it explains all of this in detail.

  • @asandasibiya2747
    @asandasibiya2747 2 місяці тому

    Hi, I've been trying to use this method but my app crashes after the conversion can you please help me 😢

    • @OuchenTech
      @OuchenTech  2 місяці тому

      Hi! To troubleshoot the issue, here are a couple of steps you can follow:
      1. Verify the buildozer.spec File: Double-check your buildozer.spec file to ensure that all required dependencies are listed in the requirements section. Missing dependencies can often cause crashes.
      2. Enable Debug Logs on Appetize: Try running your APK on the Appetize website. Make sure to enable debug logs-this will allow you to see detailed logs of what’s happening when the app crashes. The logs can help identify the exact cause of the crash. ( Watch the last part of the video to see how to run your app on Appetize website )

    • @asandasibiya2747
      @asandasibiya2747 2 місяці тому

      @@OuchenTech Thank you so much. Appetize worked and the error was the firebase-admin module and the mapview module. Fixed it by using Rest APIs for firebase and for mapview on the Kv file you import it as kivy_garden.mapview.Mapview instead of kivy.garden.mapview.Mapview

  • @unlish5996
    @unlish5996 4 місяці тому +1

    Aidl not found. please install it

    • @OuchenTech
      @OuchenTech  4 місяці тому

      The error you're encountering is likely due to changes made in the action by the author. To fix this issue, update your build.yml file by following these steps:
      Go to the GitHub repository of the action (Use the link in the description)
      In the README file, locate the 'How to Use' section.
      Copy the provided example code and paste it into your build.yml.
      I made a test, and it works now with no errors. Always check for action updates before converting your app.

    • @OuchenTech
      @OuchenTech  4 місяці тому

      The error you're encountering is likely due to changes made in the action by the author. To fix this issue, update your build.yml file by following these steps:
      Go to the GitHub repository of the action (Use the link in the description)
      In the README file, locate the 'How to Use' section.
      Copy the provided example code and paste it into your build.yml.
      I made a test, and it works now with no errors. Always check for action updates before converting your app.

  • @gumalgamul
    @gumalgamul 3 місяці тому

    wow.... this is what i search

  • @CupidxDD
    @CupidxDD 3 місяці тому +3

    irritate music please dont use music

    • @OuchenTech
      @OuchenTech  3 місяці тому

      Hi, i respect your opinion but you can mute the video 😁

  • @faizullahhussaini5367
    @faizullahhussaini5367 5 місяців тому

    Hi
    Do you have kivy MD2 video

    • @OuchenTech
      @OuchenTech  5 місяців тому

      I didn't understand your question?

  • @lalitsharma1589
    @lalitsharma1589 3 місяці тому

    Bro can u help me in google colab for make apk using buildoser??

    • @OuchenTech
      @OuchenTech  3 місяці тому

      why would you use google colab? using github action is much easier.

  • @AdhamMohamed-l1u
    @AdhamMohamed-l1u 5 місяців тому

    How to make for flet please ?
    😢

    • @OuchenTech
      @OuchenTech  5 місяців тому +1

      I'm not a flet user 😁

    • @XDgamer1
      @XDgamer1 3 місяці тому

      do you still searching?