<bdo id='JDVzi'></bdo><ul id='JDVzi'></ul>
  1. <small id='JDVzi'></small><noframes id='JDVzi'>

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

      <legend id='JDVzi'><style id='JDVzi'><dir id='JDVzi'><q id='JDVzi'></q></dir></style></legend>
    1. Pyjnius 导入 jar 文件

      时间:2023-10-09
      • <i id='2sHvY'><tr id='2sHvY'><dt id='2sHvY'><q id='2sHvY'><span id='2sHvY'><b id='2sHvY'><form id='2sHvY'><ins id='2sHvY'></ins><ul id='2sHvY'></ul><sub id='2sHvY'></sub></form><legend id='2sHvY'></legend><bdo id='2sHvY'><pre id='2sHvY'><center id='2sHvY'></center></pre></bdo></b><th id='2sHvY'></th></span></q></dt></tr></i><div id='2sHvY'><tfoot id='2sHvY'></tfoot><dl id='2sHvY'><fieldset id='2sHvY'></fieldset></dl></div>

          <legend id='2sHvY'><style id='2sHvY'><dir id='2sHvY'><q id='2sHvY'></q></dir></style></legend>
            <tbody id='2sHvY'></tbody>

          • <tfoot id='2sHvY'></tfoot>

            <small id='2sHvY'></small><noframes id='2sHvY'>

                <bdo id='2sHvY'></bdo><ul id='2sHvY'></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 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:在 Python (PyQt4) 中显示弹出窗口 下一篇:Kivy CheckBox 看起来像实心黑框(不是复选框)

                相关文章

                最新文章

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

                <small id='1mgge'></small><noframes id='1mgge'>

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

                      <bdo id='1mgge'></bdo><ul id='1mgge'></ul>