亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Dash-plotly 部署為 Android 或 IOS 的 apk

Dash-plotly 部署為 Android 或 IOS 的 apk

當年話下 2023-09-26 15:12:18
有沒有辦法為 Android 或 IOS 創建一個 dash-plotly 應用程序?我已經閱讀了一些Beeware文檔,但我仍然不知道如何獲取我的儀表板并將其包含到 app.py 默認文件中:import togafrom toga.style import Packfrom toga.style.pack import COLUMN, ROWclass Matics(toga.App):    def startup(self):        """        Construct and show the Toga application.        Usually, you would add your application to a main content box.        We then create a main window (with a name matching the app), and        show the main window.        """        main_box = toga.Box()        self.main_window = toga.MainWindow(title=self.formal_name)        self.main_window.content = main_box        self.main_window.show()def main():    return Matics()他們提供的示例是一個 Hello world 應用程序,其代碼如下:class HelloWorld(toga.App):    def startup(self):        main_box = toga.Box(style=Pack(direction=COLUMN))        name_label = toga.Label(            'Your name: ',            style=Pack(padding=(0, 5))        )        self.name_input = toga.TextInput(style=Pack(flex=1))        name_box = toga.Box(style=Pack(direction=ROW, padding=5))        name_box.add(name_label)        name_box.add(self.name_input)        button = toga.Button(            'Say Hello!',            on_press=self.say_hello,            style=Pack(padding=5)        )        main_box.add(name_box)        main_box.add(button)        self.main_window = toga.MainWindow(title=self.formal_name)        self.main_window.content = main_box        self.main_window.show()    def say_hello(self, widget):        print("Hello", self.name_input.value)我還沒有找到一種方法將破折號圖代碼包含在 main_box 中。我的目標是將儀表板作為 Android 的 APK,所以如果 beeware 不是解決方案,我會很高興看到解決方案是什么。
查看完整描述

1 回答

?
互換的青春

TA貢獻1797條經驗 獲得超6個贊

要將公文包代碼部署到 apk 中,首先在項目目錄中打開命令提示符,然后在命令窗口中鍵入:

briefcase create android

完成所有工作后,然后鍵入:

briefcase build android

然后需要幾分鐘的時間,然后你的 apk 將被創建,并為此創建一個 iOS 應用程序,你需要和 Mac PC 和命令是相同的,但你必須用 iOS 替換 android .. 謝謝


查看完整回答
反對 回復 2023-09-26
  • 1 回答
  • 0 關注
  • 110 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號