Closed hazik-khalid closed 7 months ago
A mi también me sucedía esto. Intenté de varias maneras y la única que me sirvió fue usando en el .yml el servidor de macos en vez del de Ubuntu asi:
build-android: runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 18
uses: actions/setup-java@v3
with:
java-version: '18'
distribution: 'temurin' # Eclipse Adoptium
- name: Install Android Command Line Tools
run: |
brew install --cask android-commandlinetools
- name: Accept Licenses
run: yes | sdkmanager --licenses
- name: Install Android SDK and Tools
run: |
sdkmanager "cmdline-tools;latest" "platforms;android-33" "emulator" "tools" "platform-tools" "ndk;25.2.9519653"
- name: Install Python and Flet
run: |
pip3 install flet
pip3 install git+https://github.com/flet-dev/python-for-android.git@3.11.6
pip3 install --upgrade cython
- name: Set up p4a
run: |
export ANDROID_SDK_ROOT="/Users/runner/Library/Android/sdk"
export NDK_VERSION=25.2.9519653
export SDK_VERSION=android-33
( echo "Y"; while true; do echo "N"; done ) | p4a create --requirements python3 --arch arm64-v8a --arch armeabi-v7a --arch x86_64 --sdk-dir $ANDROID_SDK_ROOT --ndk-dir $ANDROID_SDK_ROOT/ndk/$NDK_VERSION --dist-name mydist
export SERIOUS_PYTHON_P4A_DIST=$HOME/.python-for-android/dists/mydist
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Build APK
run: flet build apk -vv
- name: Archive APK
run: |
zip -r (el nombre de tu app)-android.zip ./build/apk/*.apk
- name: Upload APK to GitHub Release
run: |
gh release upload ${{ github.event.release.tag_name }} (el nombre de tu app)-android.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
No activity here, cool... Have the same problem - blank screen
Does anyone EVER succeded with apk build on ubuntu??
Na i wasted god know how many days at last shifted to react native
Description: When running my Python GUI framework, Flet, in web view or normal window mode, the app displays correctly However, after packing it into an APK using the provided GitHub workflow and .yml file, the app exhibits a light-black gray color instead. No errors occur during the build process.
Expected Behavior: The app's appearance should remain consistent whether running in web or normal window with the apk version
Additional Information:
Workflow .yml File:
name: Python and Flutter Build
on: push: branches:
jobs: build: runs-on: ubuntu-latest