找不到ndk-build文件,但被称为

时间:2018-07-06 12:46:59

标签: android android-ndk circleci circleci-2.0

在circleci环境中,在控制台中调用ndk-build会给我错误:

/home/circleci/project/android-ndk-r10d/ndk-build: 158: 

/home/circleci/project/android-ndk-r10d/ndk-build: file: not found

,但是它将运行ndk-build可执行文件。我不确定是什么原因。

ndk日志如下:

NDK_LOG=1 ndk-build -n | grep HOST -C 5
HOST_OS=linux
HOST_ARCH=x86_64
/home/circleci/project/android-ndk-r10d/ndk-build: 158: /home/circleci/project/android-ndk-r10d/ndk-build: file: not found
HOST_ARCH=x86 (32-bit userland detected)
HOST_TAG=linux-x86 
GNUMAKE=/usr/bin/make (system path)
Android NDK: NDK installation path auto-detected: '/home/circleci/project/android-ndk-r10d'
Android NDK: GNU Make version 4.1 detected
Android NDK: Host OS was auto-detected: linux
Android NDK:  Host operating system detected: linux
/bin/sh: 1: file: not found
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to linux-x86
Android NDK: Host tools prebuilt directory not found
Android NDK: Host 'echo' tool: echo
Android NDK: Host 'echo -n' tool: printf %s
Android NDK: Host 'cmp' tool: cmp
Android NDK: Host 'awk' tool: awk
/home/circleci/project/android-ndk-r10d/build/core/build-local.mk:148: *** Android NDK: Aborting    .  Stop.
Exited with code 2

为解决"/bin/sh: 1: file: not found"问题,我使用以下命令安装了'file:

  

sudo apt-get install -y文件

但是我仍然有错误:

#!/bin/bash -eo pipefail
NDK_LOG=1 ndk-build -n | grep HOST -C 5
HOST_OS=linux
HOST_ARCH=x86_64
HOST_ARCH=x86 (32-bit userland detected)
HOST_TAG=linux-x86 
GNUMAKE=/usr/bin/make (system path)
Android NDK: NDK installation path auto-detected: '/home/circleci/project/android-ndk-r10d'
Android NDK: GNU Make version 4.1 detected
Android NDK: Host OS was auto-detected: linux
Android NDK:  Host operating system detected: linux
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to linux-x86
Android NDK: Host tools prebuilt directory not found
Android NDK: Host 'echo' tool: echo
Android NDK: Host 'echo -n' tool: printf %s
Android NDK: Host 'cmp' tool: cmp
Android NDK: Host 'awk' tool: awk
/home/circleci/project/android-ndk-r10d/build/core/build-local.mk:148: *** Android NDK: Aborting    .  Stop.
Exited with code 2

我该如何解决

Android NDK: Host tools prebuilt directory not found

0 个答案:

没有答案