简单的Kivy应用程序无法构建

时间:2015-08-27 22:42:19

标签: android python kivy buildozer

我写了一个简单的kivy应用程序来复制按钮

import kivy
from kivy.app import App
from kivy.uix.button import Button
from kivy.uix.boxlayout import BoxLayout

class ButtonApp(App):

    def add_button(self, none):
        button = Button(text='Press Me too!')
        button.bind(on_press=self.add_button)
        self.b.add_widget(button)

    def build(self):
        self.b = BoxLayout()
        button = Button(text="Press me!")
        button.bind(on_press=self.add_button)
        self.b.add_widget(button)
        return self.b

if __name__ == "__main__":
    ButtonApp().run()

但是当我运行buildozer android debug时,我收到以下错误

# Android SDK found at /Users/mmalkin/.buildozer/android/platform/android-sdk-21
# Android NDK found at /Users/mmalkin/.buildozer/android/platform/android-ndk-r9c
# Command failed: /Users/mmalkin/.buildozer/android/platform/android-sdk-21/tools/android list sdk -u -e
# 
# Buildozer failed to execute the last command
# If the error is not obvious, please raise the log_level to 2
# and retry the latest command.
# In case of a bug report, please add a full log with log_level = 2

我尝试将目录更改为Macintosh HD,更新Java以及此站点上建议的许多其他解决方案。我做错了什么?

1 个答案:

答案 0 :(得分:0)

您可能没有安装构建工具。检查这个正在进行的错误报告 - https://github.com/kivy/buildozer/issues/146

解决方案摘要,运行Android SDK Manager并以此方式安装。