<i id='OM6ph'><tr id='OM6ph'><dt id='OM6ph'><q id='OM6ph'><span id='OM6ph'><b id='OM6ph'><form id='OM6ph'><ins id='OM6ph'></ins><ul id='OM6ph'></ul><sub id='OM6ph'></sub></form><legend id='OM6ph'></legend><bdo id='OM6ph'><pre id='OM6ph'><center id='OM6ph'></center></pre></bdo></b><th id='OM6ph'></th></span></q></dt></tr></i><div id='OM6ph'><tfoot id='OM6ph'></tfoot><dl id='OM6ph'><fieldset id='OM6ph'></fieldset></dl></div>
<legend id='OM6ph'><style id='OM6ph'><dir id='OM6ph'><q id='OM6ph'></q></dir></style></legend>

    1. <tfoot id='OM6ph'></tfoot>

        <bdo id='OM6ph'></bdo><ul id='OM6ph'></ul>

      <small id='OM6ph'></small><noframes id='OM6ph'>

      Kivy Opencv Android

      时间:2023-09-01
      • <bdo id='iGUHU'></bdo><ul id='iGUHU'></ul>

          • <legend id='iGUHU'><style id='iGUHU'><dir id='iGUHU'><q id='iGUHU'></q></dir></style></legend>

            <small id='iGUHU'></small><noframes id='iGUHU'>

              <tbody id='iGUHU'></tbody>
              <i id='iGUHU'><tr id='iGUHU'><dt id='iGUHU'><q id='iGUHU'><span id='iGUHU'><b id='iGUHU'><form id='iGUHU'><ins id='iGUHU'></ins><ul id='iGUHU'></ul><sub id='iGUHU'></sub></form><legend id='iGUHU'></legend><bdo id='iGUHU'><pre id='iGUHU'><center id='iGUHU'></center></pre></bdo></b><th id='iGUHU'></th></span></q></dt></tr></i><div id='iGUHU'><tfoot id='iGUHU'></tfoot><dl id='iGUHU'><fieldset id='iGUHU'></fieldset></dl></div>

              <tfoot id='iGUHU'></tfoot>
              • 本文介绍了Kivy Opencv Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我正在尝试构建一个基于 Kivy 和 OpenCv 的示例 Android 应用:

                I'm trying to build an example Android app based on Kivy and OpenCv:

                import kivy
                from kivy.uix.button import Button
                import cv2
                kivy.require('1.0.6') 
                
                
                from kivy.app import App
                from kivy.uix.label import Label
                
                
                class MyApp(App):
                
                    def build(self):
                        return Button(text='Hello!',
                                      background_color=(0, 0, 1, 1),  
                                      font_size=150)
                
                
                if __name__ == '__main__':
                    MyApp().run()
                

                在桌面上运行此示例时,它运行良好,但是当我使用 buildozer 构建 APK 并尝试在手机上运行它时,应用程序会立即打开和关闭.我的构建器设置是:

                When running this example on desktop, it works fine, nevertheless when I build the APK with buildozer and try to run it on the phone, the app opens and closes immediately. My buildozer settings are:

                [app]
                
                title = MyTest
                
                package.name = kivycrash2
                
                package.domain = org.test
                
                source.dir = .
                
                source.include_exts = py,png,jpg,kv,atlas
                
                version = 0.1
                
                requirements =  kivy, numpy, cv2
                
                orientation = landscape
                

                如果我从代码中删除import cv2"并从 buildozer 中删除 cv2 和 numpy 要求,生成的 apk 在手机上运行良好.

                If I remove the "import cv2" from the code and also remove the cv2 and numpy requirements from buildozer, the generated apk runs fine on the phone.

                是否可以让 opencv 在 Android 设备上与 Kivy 一起工作?buildozer 是否使用我系统上安装的 opencv 版本(opencv 3)?

                Is it possible to make opencv work with Kivy on an Android device? Does buildozer use the opencv version installed on my system (opencv 3)?

                谢谢.

                推荐答案

                为了解决手机上运行apk时立即崩溃的问题,buildozer.spec文件必须设置如下:

                To solve the immediate crash when running the apk on the phone, the buildozer.spec file must be setup as follows:

                [app]
                
                title = MyTest
                
                package.name = kivycrash2
                
                package.domain = org.test
                
                source.dir = .
                
                source.include_exts = py,png,jpg,kv,atlas
                
                version = 0.1
                
                requirements =  kivy, numpy, opencv
                
                orientation = landscape
                

                @Fins 建议

                谢谢.

                这篇关于Kivy Opencv Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:armeabi-v7a、arm64-v8a、x86 有什么区别? 下一篇:通过 Kivy 访问 Android 相机

                相关文章

                最新文章

                  • <bdo id='sIWjU'></bdo><ul id='sIWjU'></ul>

                  <small id='sIWjU'></small><noframes id='sIWjU'>

                1. <tfoot id='sIWjU'></tfoot>
                2. <legend id='sIWjU'><style id='sIWjU'><dir id='sIWjU'><q id='sIWjU'></q></dir></style></legend>

                    <i id='sIWjU'><tr id='sIWjU'><dt id='sIWjU'><q id='sIWjU'><span id='sIWjU'><b id='sIWjU'><form id='sIWjU'><ins id='sIWjU'></ins><ul id='sIWjU'></ul><sub id='sIWjU'></sub></form><legend id='sIWjU'></legend><bdo id='sIWjU'><pre id='sIWjU'><center id='sIWjU'></center></pre></bdo></b><th id='sIWjU'></th></span></q></dt></tr></i><div id='sIWjU'><tfoot id='sIWjU'></tfoot><dl id='sIWjU'><fieldset id='sIWjU'></fieldset></dl></div>