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

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

        Pyjnius 导入 jar 文件

        Pyjnius import jar file(Pyjnius 导入 jar 文件)
      1. <legend id='a60IA'><style id='a60IA'><dir id='a60IA'><q id='a60IA'></q></dir></style></legend>

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

              <tbody id='a60IA'></tbody>
          • <tfoot id='a60IA'></tfoot>

              <i id='a60IA'><tr id='a60IA'><dt id='a60IA'><q id='a60IA'><span id='a60IA'><b id='a60IA'><form id='a60IA'><ins id='a60IA'></ins><ul id='a60IA'></ul><sub id='a60IA'></sub></form><legend id='a60IA'></legend><bdo id='a60IA'><pre id='a60IA'><center id='a60IA'></center></pre></bdo></b><th id='a60IA'></th></span></q></dt></tr></i><div id='a60IA'><tfoot id='a60IA'></tfoot><dl id='a60IA'><fieldset id='a60IA'></fieldset></dl></div>
                <bdo id='a60IA'></bdo><ul id='a60IA'></ul>
                  本文介绍了Pyjnius 导入 jar 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  Pyjnius 允许您为 java 类创建一个 python 包装器,例如:

                  Pyjnius allows you to create a python wrapper for java classes like:

                  Hardware = autoclass('org.myapp.Hardware')
                  

                  有没有办法像这样导入现有的 *.jar 文件?语法是什么样的?

                  Is there a way to import an existing *.jar file like that? What does the syntax look like?

                  推荐答案

                  jar文件只与android相关,你需要在你的buildozer.spec中添加jar文件

                  As much as jar file relevant only for android, you need to add jar file in your buildozer.spec like

                  android.add_jars = java/myjar.jar
                  

                  在您应用的 build 方法中

                  from kivy.utils import platform
                  ...
                  if platform() == 'android':
                      BlaClass = autoclass('java.bla.BlaClass')
                  ...
                  

                  这篇关于Pyjnius 导入 jar 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Kivy 1.9.0 Windows package KeyError: #39;rthooks#39;(Kivy 1.9.0 Windows 包 KeyError: rthooks)
                  Python Kivy: how to call a function on button click?(Python Kivy:如何在按钮单击时调用函数?)
                  How to disable a widget in Kivy?(如何禁用 Kivy 中的小部件?)
                  Centering an object in Kivy(在 Kivy 中将对象居中)
                  How to downgrade to Python 3.4 from 3.5(如何从 Python 3.5 降级到 Python 3.4)
                  Change button or label text color in kivy(在kivy中更改按钮或标签文本颜色)
                    • <bdo id='LIh6K'></bdo><ul id='LIh6K'></ul>
                      1. <small id='LIh6K'></small><noframes id='LIh6K'>

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

                            <tfoot id='LIh6K'></tfoot>