pythonforandroid/kivy python 2出现Android NDK 15c错误

2024-07-04 12:58:33 发布

您现在位置:Python中文网/ 问答频道 /正文

在使用buildozer编译代码时,代码给出了一个错误,我认为是错误的(设置APP_ALLOW_MISSING_DEPS=true以允许缺少依赖项) bt不确定。在

我在buildozer规范文件中复制了错误(日志2)和主要规范。在

错误日志

[INFO]:    -> running ndk-build V=1 APP_ABI=armeabi-v7a
Exception in thread background thread for pid 14878:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1540, in wrap
    fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 2459, in background_thread
    handle_exit_code(exit_code)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 2157, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
ErrorReturnCode_2: 

  RAN: /home/sherif/Downloads/android-ndk-r15c-linux-x86_64/android-ndk-r15c/ndk-build V=1 APP_ABI=armeabi-v7a

  STDOUT:
Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-14.    
jni/Android.mk:11: extraneous text after 'ifeq' directive
/home/sherif/Downloads/android-ndk-r15c-linux-x86_64/android-ndk-r15c/build/core/build-binary.mk:688: Android NDK: Module cjpeg depends on undefined modules: cutils    
/home/sherif/Downloads/android-ndk-r15c-linux-x86_64/android-ndk-r15c/build/core/build-binary.mk:701: *** Android NDK: Aborting (set APP_ALLOW_MISSING_DEPS=true to allow missing dependencies)    .  Stop.


  STDERR:


Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/sherif/Desktop/P2/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 916, in <module>
    main()
  File "/home/sherif/Desktop/P2/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 913, in main
    ToolchainCL()
  File "/home/sherif/Desktop/P2/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 514, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/home/sherif/Desktop/P2/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 147, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/sherif/Desktop/P2/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 192, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "pythonforandroid/build.py", line 572, in build_recipes
  File "/home/sherif/Desktop/P2/.buildozer/android/platform/python-for-android-master/pythonforandroid/recipes/jpeg/__init__.py", line 29, in build_arch
    super(JpegRecipe, self).build_arch(arch)
  File "pythonforandroid/recipe.py", line 710, in build_arch
  File "pythonforandroid/logger.py", line 175, in shprint
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 863, in next
    self.wait()
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 792, in wait
    self.handle_command_exit_code(exit_code)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_2: 

  RAN: /home/sherif/Downloads/android-ndk-r15c-linux-x86_64/android-ndk-r15c/ndk-build V=1 APP_ABI=armeabi-v7a

  STDOUT:
Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-14.    
jni/Android.mk:11: extraneous text after 'ifeq' directive
/home/sherif/Downloads/android-ndk-r15c-linux-x86_64/android-ndk-r15c/build/core/build-binary.mk:688: Android NDK: Module cjpeg depends on undefined modules: cutils    
/home/sherif/Downloads/android-ndk-r15c-linux-x86_64/android-ndk-r15c/build/core/build-binary.mk:701: *** Android NDK: Aborting (set APP_ALLOW_MISSING_DEPS=true to allow missing dependencies)    .  Stop.


  STDERR:

# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=master --bootstrap=sdl2 --requirements=kivy,pil --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/sherif/Desktop/P2/.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

规范文件中的更改

^{pr2}$

使用ndk9c没有错误,但是应用程序在启动时崩溃。在


Tags: inpybuildhomelibusrdistline

热门问题