Git Product home page Git Product logo

Comments (7)

r0x0r avatar r0x0r commented on May 25, 2024

There is a brief freezing guide here https://pywebview.flowrl.com/guide/freezing.html#android
Ultimately you need to get familiar with Buildozer. Start here https://buildozer.readthedocs.io/en/latest/quickstart.html

from pywebview.

diyism avatar diyism commented on May 25, 2024

@r0x0r ,

I've executed "pip install --upgrade pywebview", and got the "android.add_jars" absolute path and filled it into "buildozer.spec",
But when I run "buildozer -v android release" in ~/pywebview/examples/todos,
I happen this error in ~/pywebview/examples/todos/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/config.log:

configure:4544: ~/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -V >&5
clang-14: error: argument to '-V' is missing (expected 1 value)

It seems that the libffi require GCC, but the NDK has get rid of GCC since r18(kivy/buildozer#1281)

How to work around this error?

Thanks.

from pywebview.

r0x0r avatar r0x0r commented on May 25, 2024

Sorry, I cannot help with buildozer issues.

buildozer is finicky when it comes to getting environment right. Good luck!

from pywebview.

diyism avatar diyism commented on May 25, 2024

Sad, there's another error:

configure:4575: checking whether the C compiler works
configure:4597: ~/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -DANDROID -I~/.buildozer/android/platform/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I~/pywebview/examples/todos/.buildozer/android/platform/build-arm64-v8a/build/python-installs/pywebview todos/arm64-v8a/include/python3.1   -L~/pywebview/examples/todos/.buildozer/android/platform/build-arm64-v8a/build/libs_collections/pywebview todos/arm64-v8a conftest.c  >&5
clang-14: error: no such file or directory: 'todos/arm64-v8a/include/python3.1'
clang-14: error: no such file or directory: 'todos/arm64-v8a'

It seems the "todos/buildozer.spec" file needs some path configuration.

from pywebview.

r0x0r avatar r0x0r commented on May 25, 2024

Here is the deploy/build script that is working for me

export ANDROIDSDK="/Users/roman/Library/Android/sdk"
export ANDROIDNDK="/Users/roman/Library/Android/sdk/ndk/25.0.8775105"
export ANDROIDAPI="30"  # Target API version of your application
export NDKAPI="21"  # Minimum supported API version of your application
export JAVA_HOME=/usr/local/opt/openjdk@17/
export ANDROID_SERIAL=emulator-5554

buildozer android debug deploy run

from pywebview.

MominIqbal-1234 avatar MominIqbal-1234 commented on May 25, 2024

buildozer Run Linux so i use the google cloab to make apk file first time you wait minimum 30 mint first kivymd apk build
i not test to pywebview not free time but i try this saturday or sunday try for pywebview

https://colab.research.google.com/drive/1kmIVFtTyXQF-PbSONC1uR7pnoMSh-aIk?usp=sharing

from pywebview.

diyism avatar diyism commented on May 25, 2024

Finally, I figured out what's wrong:
1.fixed the error "clang-14: error: no such file or directory: 'todos/arm64-v8a'", the buildozer package.name requirement is one word with only ASCII characters and/or numbers. It should not contain any special characters
2.fix the error "if exclude_dir[-1] != '/':IndexError: string index out of range" while "buildozer -v android release"
Now the command "buildozer -v android debug deploy run" works like a charm.

I've submitted a pull request: #1368

from pywebview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.