kivy / kivy/python-for-android

cv2 It cannot run on Android.

Đang mở
#3,156 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
recipe
Ngôn ngữ chính
Python
Star
8.9k
Fork
2k
Merge trung bình
12 giờ 20 phút
Pull request đã merge (30 ngày)
9

Mô tả

**Software Versions**
* Python: python3
* OS:Android
* Kivy: /
* Kivy installation method:

**Describe the bug**
A clear and concise description of what the bug is.

The issue tracker is a tool to address **bugs only** (search known bugs: https://git.io/vM1iE).
Please use the #support Discord channel at https://chat.kivy.org/ or Stack Overflow for
support questions, more information at https://git.io/vM1yQ.

**Expected behavior**
A clear and concise description of what you expected to happen.
[WARNING] stderr: Traceback (most recent call last):
[WARNING] stderr: File "/root/kivy_installer/.buildozer/android/app/main.py", line 5, in
[WARNING] stderr: File "/root/kivy_installer/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/cv2/__init__.py", line 181, in
[WARNING] stderr: File "/root/kivy_installer/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/cv2/__init__.py", line 111, in bootstrap
[WARNING] stderr: File "/root/kivy_installer/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/cv2/__init__.py", line 109, in load_first_config
[WARNING] stderr: ImportError: OpenCV loader: missing configuration file: ['config.py']. Check OpenCV installation.
**To Reproduce**
A short, *runnable* example that reproduces the issue with *latest kivy master*.

**Code and Logs and screenshots**
```python
// REPLACE ME: Paste your code and logs here, a template can be found at https://git.io/vM1id.
from kivy.app import App
from kivy.uix.image import Image
from kivy.clock import Clock
from kivy.graphics.texture import Texture
import cv2

class Re_App(App):
def __init__(self):
super(Re_App, self).__init__()
self.apt = cv2.VideoCapture(0)
self.body = Image()
def build(self):
return self.body

def on_start(self):
Clock.schedule_interval(self.update, 1/30)

def update(self, dt):

is_code, image = self.apt.read()

width, height = image.shape[1], image.shape[0]
texture1 = Texture.create(size=(width, height))
texture1.blit_buffer(image.tobytes(), colorfmt='bgr')

self.body.texture = texture1

Re_App().run()
```

**Additional context**
Add any other context about the problem here.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện ví dụ Python được cung cấp trên Android và kiểm tra traceback từ cv2/__init__.py, đặc biệt là lỗi thiếu config.py. Issue được giải quyết khi cùng một ứng dụng có thể import cv2 và chạy mà không gặp lỗi loader của OpenCV.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
android, opencv, python
Lĩnh vực
build-system, mobile-dev
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
18/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.