【问题标题】:How do you fix "Build failed: Android SDK dir was not specified, exiting."如何修复“构建失败:未指定 Android SDK 目录,正在退出。”
【发布时间】:2019-12-20 05:08:53
【问题描述】:

我正在尝试构建一个 kivy apk,但我不断收到此错误,“构建失败:未指定 Android SDK 目录,正在退出。”。我需要做什么来修复它?

当我跑步时:

 python3 -m pythonforandroid.toolchain create --dist_name=simpleapp --bootstrap=sdl2 --requirements=python3,kivy,android --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/haryo/kivy-game-2.0/.buildozer/android/platform/build" --ndk-api=21

我明白了:

[INFO]:    Will compile for the following archs: armeabi-v7a
[ERROR]:   Build failed: Android SDK dir was not specified, exiting.

【问题讨论】:

    标签: linux ubuntu kivy buildozer


    【解决方案1】:

    您需要...指定 sdk 目录。使用 --sdk-dir=... 参数将路径传递给 Android SDK。

    您还需要对 NDK 执行相同的操作。

    【讨论】:

    • 那么我在哪里添加。是在python for android命令中吗?
    • 是的,请参阅the documentation
    猜你喜欢
    • 1970-01-01
    • 2023-02-17
    • 1970-01-01
    • 2019-02-24
    • 1970-01-01
    • 1970-01-01
    • 2015-06-18
    • 2020-05-02
    • 1970-01-01
    相关资源
    最近更新 更多