saurabhwadekar / flet_route

Simplest way of flet routing
MIT License
55 stars 3 forks source link

Unable to build apk when I include flet-route in requirements.txt #9

Closed lurdray closed 5 months ago

lurdray commented 6 months ago

I get the following errors:

Flutter bootstrap directory: /var/folders/0z/j9wwzxsj2k3fz7gft1ws_kkc0000gn/T/flet_flutter_build_TFx8OdAzb7 Additional Flutter dependencies: {} Creating Flutter bootstrap project...OK Customizing app icons and splash images...OK Generating app icons... Run subprocess: ['/Users/temi/Desktop/desktop1//RayFlutter/flutter/bin/dart', 'run', 'flutter_launcher_icons'] Resolving dependencies in /private/var/folders/0z/j9wwzxsj2k3fz7gft1ws_kkc0000gn/T/flet_flutter_build_TFx8OdAzb7... (3.5s) Got dependencies in /private/var/folders/0z/j9wwzxsj2k3fz7gft1ws_kkc0000gn/T/flet_flutter_build_TFx8OdAzb7. Building package executable... (2.2s) Built flutter_launcher_icons:flutter_launcher_icons. ════════════════════════════════════════════ FLUTTER LAUNCHER ICONS (v0.13.1)
════════════════════════════════════════════

• Creating default icons Android • Overwriting the default Android launcher icon with a new icon • Overwriting default iOS launcher icon with new icon Creating Icons for Web... done Creating Icons for Windows... done Creating Icons for MacOS... done

✓ Successfully generated launcher icons OK Generating splash screens... Run subprocess: ['/Users/temi/Desktop/desktop1//RayFlutter/flutter/bin/dart', 'run', 'flutter_native_splash:create'] Building package executable... (2.1s) Built flutter_native_splash:create. [Android] Creating default splash images [Android] Creating dark mode splash images [Android] Creating default android12splash images [Android] Creating dark mode android12splash images [Android] Updating launch background(s) with splash image path... [Android] - android/app/src/main/res/drawable/launch_background.xml [Android] - android/app/src/main/res/drawable-night/launch_background.xml [Android] - android/app/src/main/res/drawable-v21/launch_background.xml [Android] - android/app/src/main/res/drawable-night-v21/launch_background.xml [Android] Updating styles... [Android] - android/app/src/main/res/values-v31/styles.xml [Android] No android/app/src/main/res/values-v31/styles.xml found in your Android project [Android] Creating android/app/src/main/res/values-v31/styles.xml and adding it to your Android project [Android] - android/app/src/main/res/values-night-v31/styles.xml [Android] No android/app/src/main/res/values-night-v31/styles.xml found in your Android project [Android] Creating android/app/src/main/res/values-night-v31/styles.xml and adding it to your Android project [Android] - android/app/src/main/res/values/styles.xml [Android] - android/app/src/main/res/values-night/styles.xml [iOS] Creating images [iOS] Creating dark mode images [iOS] Updating ios/Runner/Info.plist for status bar hidden/visible [Web] Creating images [Web] Creating images [Web] Creating background images [Web] Creating CSS [Web] Updating index.html ╔════════════════════════════════════════════════════════════════════════════╗ ║ NEED A GREAT FLUTTER DEVELOPER? ║ ╠════════════════════════════════════════════════════════════════════════════╣ ║ ║ ║ I am available! Find me at https://www.linkedin.com/in/hansonjon/ ║ ║ ║ ╚════════════════════════════════════════════════════════════════════════════╝

✅ Native splash complete. Now go finish building something awesome! 💪 You rock! 🤘🤩 Like the package? Please give it a 👍 here: https://pub.dev/packages/flutter_native_splash

OK Packaging Python app... Run subprocess: ['/Users/temi/Desktop/desktop1//RayFlutter/flutter/bin/dart', 'run', 'serious_python:main', 'package', '/Users/temi/Desktop/RayFlet/cool', '--mobile', '--platform', 'mobile', '--dep-mappings', 'flet=flet-embed', '--req-deps', 'flet-embed', '--exclude', 'build'] Building package executable... (1.1s) Built serious_python:main. Running package command Creating asset directory: /private/var/folders/0z/j9wwzxsj2k3fz7gft1ws_kkc0000gn/T/flet_flutter_build_TFx8OdAzb7/app Copying Python app from /Users/temi/Desktop/RayFlet/cool to /var/folders/0z/j9wwzxsj2k3fz7gft1ws_kkc0000gn/T/serious_python_tempEU0Z6h Configured mobile platform with sitecustomize.py at /var/folders/0z/j9wwzxsj2k3fz7gft1ws_kkc0000gn/T/serious_python_sitecustomizeszSeYa/sitecustomize.py Installing dependencies [flet-embed, flet-route, requests] with pip command to /var/folders/0z/j9wwzxsj2k3fz7gft1ws_kkc0000gn/T/serious_python_tempEU0Z6h/pypackages Extracting Python distributive from /var/folders/0z/j9wwzxsj2k3fz7gft1ws_kkc0000gn/T/cpython-3.11.6+20231002-x86_64-apple-darwin-install_only.tar.gz to /var/folders/0z/j9wwzxsj2k3fz7gft1ws_kkc0000gn/T/hostpython3.11_KIgCmK /var/folders/0z/j9wwzxsj2k3fz7gft1ws_kkc0000gn/T/hostpython3.11_KIgCmK/python/lib/python3.11/site-packages/_distutils_hack/init.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.") error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [60 lines of output] Collecting maturin<2,>=0.14.16 Using cached maturin-1.5.1.tar.gz (181 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: maturin Building wheel for maturin (pyproject.toml): started Building wheel for maturin (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error

    × Building wheel for maturin (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> [35 lines of output]
        /private/var/folders/0z/j9wwzxsj2k3fz7gft1ws_kkc0000gn/T/pip-build-env-38px953a/overlay/lib/python3.11/site-packages/setuptools/config/_apply_pyprojecttoml.py:83: SetuptoolsWarning: `install_requires` overwritten in `pyproject.toml` (dependencies)
          corresp(dist, value, root_dir)
        running bdist_wheel
        running build
        running build_py
        creating build
        creating build/lib.macosx-10.9-x86_64-cpython-311
        creating build/lib.macosx-10.9-x86_64-cpython-311/maturin
        copying maturin/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-311/maturin
        copying maturin/import_hook.py -> build/lib.macosx-10.9-x86_64-cpython-311/maturin
        copying maturin/__main__.py -> build/lib.macosx-10.9-x86_64-cpython-311/maturin
        running egg_info
        creating maturin.egg-info
        writing maturin.egg-info/PKG-INFO
        writing dependency_links to maturin.egg-info/dependency_links.txt
        writing requirements to maturin.egg-info/requires.txt
        writing top-level names to maturin.egg-info/top_level.txt
        writing manifest file 'maturin.egg-info/SOURCES.txt'
        reading manifest file 'maturin.egg-info/SOURCES.txt'
        reading manifest template 'MANIFEST.in'
        warning: no files found matching '*.json' under directory 'src/python_interpreter'
        writing manifest file 'maturin.egg-info/SOURCES.txt'
        running build_ext
        running build_rust
        error: can't find Rust compiler

        If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

        To update pip, run:

            pip install --upgrade pip

        and then retry package installation.

        If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for maturin
  Failed to build maturin
  ERROR: Could not build wheels for maturin, which is required to install pyproject.toml-based projects

  [notice] A new release of pip is available: 23.2.1 -> 24.0
  [notice] To update, run: /var/folders/0z/j9wwzxsj2k3fz7gft1ws_kkc0000gn/T/hostpython3.11_KIgCmK/python/bin/python3 -m pip install --upgrade pip
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

[notice] A new release of pip is available: 23.2.1 -> 24.0 [notice] To update, run: /var/folders/0z/j9wwzxsj2k3fz7gft1ws_kkc0000gn/T/hostpython3.11_KIgCmK/python/bin/python3 -m pip install --upgrade pip Deleting Flutter bootstrap directory /var/folders/0z/j9wwzxsj2k3fz7gft1ws_kkc0000gn/T/flet_flutter_build_TFx8OdAzb7 Error building Flet app - see the log of failed command above.

saurabhwadekar commented 5 months ago

Copy the flet_route directory from the env directory to the project root directory. And change the name. And change its name to fletroute. And also replace flet_route with fletroute in the code, and uninstall flet_route. This problem is occurring because of the name flet_route

jmv74211 commented 4 months ago

Thank you guys,

I had the same problem and I have been able to solve it as @saurabhwadekar commented.

saurabhwadekar commented 4 months ago

I am going to rename this lib soon.