0

我写了一个复制按钮的简单 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 以及该站点上建议的许多其他解决方案。我究竟做错了什么?

4

1 回答 1

0

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

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

于 2015-09-04T07:14:25.380 回答