You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the opened issues and there are no duplicates
Describe the bug
Dear developper,
The error I have is similar to error described in #4198 , #4203,
After reinstalling all tools and software from scratch, I finally generated the APK, but the app doesn't work.
(venv) C:\Users\JeanClaude\Documents\Flet\map_ortho_shp>flet build apk
[17:56:28] Created Flutter bootstrap project from gh:flet-dev/flet-build-template with ref 0.25.2 ✅
Customized app icons and splash images ✅
[17:56:31] Generated app icons ✅
[17:56:32] Generated splash screens ✅
[17:57:46] Packaged Python app ✅
[17:58:22] Built .apk for Android ✅
Copied build to build\apk directory ✅
Successfully built your .apk for Android! 🥳 Find it in build\apk directory. 📁
But in Android emulator, the following error appears with android 13 or 14 (API 33 or 34, Pixel 8 device).
... ImportError: dlopen failed: library "libc++_shared.so" not found ...
details here from the emulated phone :
"
Traceback (most recent call last):
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/_core/init.py", line 23, in
from . import multiarray
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/_core/multiarray.py", line 10, in
from . import overrides
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/_core/overrides.py", line 8, in
from numpy._core._multiarray_umath import (
ImportError: dlopen failed: library "libc++_shared.so" not found: needed by /data/data/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/_core/_multiarray_umath.cpython-312.so in namespace classloader-namespace
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/init.py", line 114, in
from numpy.config import show as show_config
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/config.py", line 4, in
from numpy._core._multiarray_umath import (
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/_core/init.py", line 49, in
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: dlopen failed: library "libc++_shared.so" not found: needed by /data/data/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/_core/_multiarray_umath.cpython-312.so in namespace classloader-namespace
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/init.py", line 119, in
raise ImportError(msg) from e
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.
Traceback (most recent call last):
File "", line 47, in
File "", line 229, in run_module
File "", line 88, in _run_code
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/app/main.py", line 20, in
from shapely.geometry import Point, Polygon
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/python_site_packages/shapely/init.py", line 1, in
from shapely.lib import GEOSException # NOQA
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: numpy._core.multiarray failed to import
"
On the real phone, nothing is displayed , only white screen.
The application run correctly on Window (with the command : flet run)
I don't know how to solve this problem,
If you have a solution, please tell me !
Duplicate Check
Describe the bug
Dear developper,
The error I have is similar to error described in #4198 , #4203,
After reinstalling all tools and software from scratch, I finally generated the APK, but the app doesn't work.
(venv) C:\Users\JeanClaude\Documents\Flet\map_ortho_shp>flet build apk
[17:56:28] Created Flutter bootstrap project from gh:flet-dev/flet-build-template with ref 0.25.2 ✅
Customized app icons and splash images ✅
[17:56:31] Generated app icons ✅
[17:56:32] Generated splash screens ✅
[17:57:46] Packaged Python app ✅
[17:58:22] Built .apk for Android ✅
Copied build to build\apk directory ✅
Successfully built your .apk for Android! 🥳 Find it in build\apk directory. 📁
The pyproject.toml :
[project]
name = "map_ortho_shp"
version = "1.1.0"
description = ""
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"flet==0.25.2",
"numpy",
"flet.map",
"shapely"
]
But in Android emulator, the following error appears with android 13 or 14 (API 33 or 34, Pixel 8 device).
... ImportError: dlopen failed: library "libc++_shared.so" not found ...
details here from the emulated phone :
"
Traceback (most recent call last):
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/_core/init.py", line 23, in
from . import multiarray
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/_core/multiarray.py", line 10, in
from . import overrides
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/_core/overrides.py", line 8, in
from numpy._core._multiarray_umath import (
ImportError: dlopen failed: library "libc++_shared.so" not found: needed by /data/data/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/_core/_multiarray_umath.cpython-312.so in namespace classloader-namespace
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/init.py", line 114, in
from numpy.config import show as show_config
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/config.py", line 4, in
from numpy._core._multiarray_umath import (
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/_core/init.py", line 49, in
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
Please note and check the following:
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: dlopen failed: library "libc++_shared.so" not found: needed by /data/data/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/_core/_multiarray_umath.cpython-312.so in namespace classloader-namespace
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/python_site_packages/numpy/init.py", line 119, in
raise ImportError(msg) from e
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.
Traceback (most recent call last):
File "", line 47, in
File "", line 229, in run_module
File "", line 88, in _run_code
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/app/main.py", line 20, in
from shapely.geometry import Point, Polygon
File "/data/user/0/com.mycompany.map_ortho_shp/files/flet/python_site_packages/shapely/init.py", line 1, in
from shapely.lib import GEOSException # NOQA
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: numpy._core.multiarray failed to import
"
On the real phone, nothing is displayed , only white screen.
The application run correctly on Window (with the command : flet run)
I don't know how to solve this problem,
If you have a solution, please tell me !
Thanks a lot,
JC
Code sample
Code
To reproduce
Generic error when numpy is used
Expected behavior
No response
Screenshots / Videos
Captures
[Upload media here]
Operating System
Windows
Operating system details
Windows 10
Flet version
Name: flet Version: 0.25.2 Summary: Flet for Python - easily build interactive multi-platform apps in Python Home-page: https://flet.dev Author: Appveyor Systems Inc. Author-email: [email protected] License: Apache-2.0 Location: C:\Users\JeanClaude\Documents\Flet\venv\Lib\site-packages Requires: httpx, oauthlib, repath Required-by: flet-cli, flet-desktop
Regression
No, it isn't
Suggestions
As the error comes from : ImportError: dlopen failed: library "libc++_shared.so" not found...
Add the missing file "libc++_shared.so" to the APK
Logs
Logs
[Paste your logs here]
Additional details
No response
The text was updated successfully, but these errors were encountered: