代码之家  ›  专栏  ›  技术社区  ›  jasan

基维:建筑工人。等级库文件未完成

  •  1
  • jasan  · 技术社区  · 6 年前

    我准备好了 kivy buildozer公司 供使用。对于安装,我使用了说明 here ,python 3的进程。步骤3之后, 建筑工人。规格 文件未完成,检查行(步骤4)有下一个内容:

    requirements = kivy
    #android.ndk_path = 
    

    关于安装后的消息 buildozer android调试部署运行 :

    # Unpacking Android NDK
    # Android NDK installation done.
    # Check application requirements
    # Check garden requirements
    # Compile platform
    # Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/media/sf_ForBuildozer/.buildozer/android/platform/build
    # 
    # 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
    

    问题的根源是什么?

    我在节中添加了log\u level=2 建筑工人 ,新消息:

    # Run '/usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/media/sf_ForBuildozer/.buildozer/android/platform/build'
    # Cwd /media/sf_ForBuildozer/.buildozer/android/platform/python-for-android-new-toolchain
    [INFO]:    Will compile for the following archs: armeabi-v7a
    [INFO]:    Found Android API target in $ANDROIDAPI
    [INFO]:    Available Android APIs are ()
    [WARNING]: Requested API target 19 is not available, install it with the SDK android tool.
    [WARNING]: Exiting.
    # Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/media/sf_ForBuildozer/.buildozer/android/platform/build
    # 
    # Buildozer failed to execute the last command
    # The error might be hidden in the log above this error
    # Please read the full log, and search for it before
    # raising an issue with buildozer itself.
    # In case of a bug report, please add a full log with log_level = 2
    

    我应用了米哈伊尔·格拉西莫夫(MikhailGerasimov)的附加功能,在短短的一步之后,我获得了新的信息:

    # Run '/usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/media/sf_ForBuildozer/.buildozer/android/platform/build'
    # Cwd /media/sf_ForBuildozer/.buildozer/android/platform/python-for-android-new-toolchain
    [INFO]:    Will compile for the following archs: armeabi-v7a
    [INFO]:    Found Android API target in $ANDROIDAPI
    [INFO]:    Available Android APIs are ()
    [WARNING]: Requested API target 19 is not available, install it with the SDK android tool.
    [WARNING]: Exiting.
    # Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/media/sf_ForBuildozer/.buildozer/android/platform/build
    
    1 回复  |  直到 6 年前
        1
  •  0
  •   Mikhail Gerasimov    6 年前

    这里的问题是,SDK不包含为目标API生成的所有内容。通常buildozer会自动处理,但有时 it breaks . 您可以通过GUI(参见上面的链接)手动安装stuff,或者像我通常通过(linux)控制台所做的那样:

    echo y | android-sdk-linux/tools/android update sdk --all --no-ui --filter tools
    echo y | android-sdk-linux/tools/android update sdk --all --no-ui --filter platform-tools
    echo y | android-sdk-linux/tools/android update sdk --all --no-ui --filter build-tools-27.0.2
    echo y | android-sdk-linux/tools/android update sdk --all --no-ui --filter android-19
    

    确保SDK目录在以下位置可用: android-sdk-linux/tools/android . 安装完所有这些之后,我认为错误应该消失了。