SKbarbon / fpyo2apk

Pack your python flet-pyodide UI app into Android app.
MIT License
39 stars 9 forks source link

Doesn't work on windows #1

Open mayman007 opened 1 year ago

mayman007 commented 1 year ago

i get this error when i python -m fpyo2apk.build on windows:

This is `fpyo2apk`. A flet-pyodide dist to apk converter.
Be sure that Android Studio is installed and setuped.
Starting..

Create a briefcase project..
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "D:\Programming_Projects\mine\Hadith_Searcher\myenv\Lib\site-packages\fpyo2apk\build.py", line 24, in <module>
    edit_an_exist_project()
  File "D:\Programming_Projects\mine\Hadith_Searcher\myenv\Lib\site-packages\fpyo2apk\beeware_tools\edit_beeware_project.py", line 11, in edit_an_exist_project
    Unzip_asset()
  File "D:\Programming_Projects\mine\Hadith_Searcher\myenv\Lib\site-packages\fpyo2apk\Tools\unzip_assets.py", line 13, in Unzip_asset
    with zipfile.ZipFile(asset_path, "r") as zip_ref:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\zipfile.py", line 1299, in __init__
    self._RealGetContents()
  File "C:\Program Files\Python311\Lib\zipfile.py", line 1366, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

i installed android studio and dist is in the same folder as the terminal

SKbarbon commented 1 year ago

It seems like you did not create a virtual environment, did you ? @Shinobi7k

mayman007 commented 1 year ago

It seems like you did not create a virtual environment, did you ? @Shinobi7k

I did

SKbarbon commented 1 year ago

I am so sorry, there was really an issue. But I did fix it! Please upgrade the package:

pip install fpyo2apk --upgrade

Please tell me if it worked!

mayman007 commented 1 year ago

I get this error on briefcase build android:


* What went wrong:
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
   > com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "C:\Users\Shinobi\.android\debug.keystore": Invalid keystore format

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
38 actionable tasks: 1 executed, 37 up-to-date
Building...

Error while building project.
ilham-025 commented 1 year ago

I get this error on briefcase build android:


* What went wrong:
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
   > com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "C:\Users\Shinobi\.android\debug.keystore": Invalid keystore format

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
38 actionable tasks: 1 executed, 37 up-to-date
Building...

Error while building project.

I have same error like this