In circleci environment, calling ndk-build in console gives me the error :
/home/circleci/project/android-ndk-r10d/ndk-build: 158:
/home/circleci/project/android-ndk-r10d/ndk-build: file: not found
but then it runs the ndk-build executable. I'm not sure what's the reason.
The ndk log is below:
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
so to resolve the "/bin/sh: 1: file: not found" issue, I installed 'file using:
sudo apt-get install -y file
but I still have the error:
#!/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
How do I resolve this
Android NDK: Host tools prebuilt directory not found
Related
When trying to build the Magisk tool (https://github.com/topjohnwu/Magisk), I encountered these errors during the build process
mv target/x86_64-linux-android/debug/libmagisk.a -> ../../native/out/x86_64/libmagisk-rs.a
Android NDK: ERROR:jni/Android.mk:boot-rs: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that jni/../out/armeabi-v7a/libmagiskboot-rs.a exists or that its path is correct
Are there any settings I need to change?
I cannot resolve this error, even though it is mentioned as resolved here in M1.
Unknown host CPU architecture: arm64 , Android NDK SiliconM1 Apple MacBook Pro
My error code.
[CXX1405] error when building with ndkBuild using /Users/adamheinrich/Desktop/android-solocoo-2.0/Solocoo/app/src/main/jni/Android.mk: Build command failed.
Error while executing process /Users/adamheinrich/Library/Android/sdk/ndk/20.1.5948944/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/adamheinrich/Desktop/android-solocoo-2.0/Solocoo/app/src/main/jni/Android.mk NDK_APPLICATION_MK=/Users/adamheinrich/Desktop/android-solocoo-2.0/Solocoo/app/src/main/jni/Application.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=1 APP_PLATFORM=android-22 NDK_OUT=/Users/adamheinrich/Desktop/android-solocoo-2.0/Solocoo/app/build/intermediates/cxx/Debug/x2j681s3/obj NDK_LIBS_OUT=/Users/adamheinrich/Desktop/android-solocoo-2.0/Solocoo/app/build/intermediates/cxx/Debug/x2j681s3/lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
ERROR: Unknown host CPU architecture: arm64
After editing ndk-build with text editor I have.
What else can I do?
How can I install .dmg beta ndk? It is not available in SDK Manager via Android Studio.
Also after editing this file my OS says it is corrupted/ damaged. How can I edit it properly?
Using Sublime Text editor instead of Macbook text editor allowed me to edit it without corrupting it. Edit ndk-build file in Library/Android/sdk/ndk
to:
#!/bin/sh
DIR="$(cd "$(dirname "$0")" && pwd)"
arch -x86_64 /bin/bash $DIR/build/ndk-build "$#"
I have installed QT 5.7.1 from the qt-everywhere source tarball on my Ubuntu 14.04 VM. I configured QT with the following incantation:
./configure -nomake tests \
-android-sdk /path/to/sdk \
-android-ndk /path/to/sdk/ndk \
-android-ndk-platform android-19 \
-android-ndk-host linux-x86_64 \
-android-arch armeabi-v7a
After that succeeded I did:
make
sudo make install
I have a project that has this specified:
QT += androidextras
When I build it (using qmake && make) I am getting the following error:
Project ERROR: Unknown module(s) in QT: androidextras
I know that the qtandroidextras folder is inside of my QT source distribution, but it isn't being built and/or installed. I must be missing a step or configuration option somewhere, but I'm not familiar enough with QT or QT on Android development to spot it.
How do you define the NDK installation that ndk-build uses? I used the r10e build for a good while, then updated my NDK and modified my $PATH to point to the new location, but when I build using the ndk-build command in Terminal it still uses the older android-ndk-r10e version.
I know this because I use the NDK_LOG=1 option when invoking ndk-build and it produces the following verbose information as it builds my project. Notice the references to "/NDKDev/android-ndk-r10e". That's my old installation.
~/Documents/MyNDKProject-- $ ndk-build NDK_LOG=1
HOST_OS=darwin
HOST_ARCH=x86_64
HOST_TAG=darwin-x86_64
GNUMAKE=/Users/user1/Documents/NDKDev/android-ndk-r10e/prebuilt/darwin-x86_64/bin/make (NDK prebuilt)
Android NDK: NDK installation path auto-detected: '/Users/user1/Documents/NDKDev/android-ndk-r10e'
Android NDK: GNU Make version 3.81 detected
Android NDK: Host OS was auto-detected: darwin
Android NDK: Host operating system detected: darwin
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to darwin-x86
Android NDK: Host tools prebuilt directory: /Users/user1/Documents/NDKDev/android-ndk-r10e/prebuilt/darwin-x86_64/bin
Android NDK: Host 'echo' tool: echo
. . .
Also note that when I enter echo $PATH at the Terminal prompt it gives:
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin/:/sbin:/usr/local/bin:/Applications/android-sdk-macosx/ndk-bundle:/Applications/android-sdk-macosx
and where you see /Applications/android-sdk-macosx/ndk-bundle is exactly where it used to refer to the android-ndk-r10e path, so I'm certain I've updated my PATH successfully. So anyhow, IF the PATH environment variable is not what ndk-build uses to determine the NDK installation to use, what does it use, and how can I modify it so that it uses my new installation which is at:
/Applications/android-sdk-macosx/ndk-bundle
Fixed. The problem was that when the .bash_profile file is successfully sourced in a given Terminal session it does not have any effect on other instances of Terminal that are open. I had two instances of Terminal open and because I hadn't closed the one with which I was calling ndk-build the changes to .bash_profile weren't being applied.
when i trying to running the command code ndk-build ,the error prompt out like this
leo#leo-PC /cygdrive
$ ndk-build
/bin/sh: NUL: No such file or directory
Error: Current working directory is a virtual Cygwin directory which does
not exist for a native Windows application.
Can't start native Windows application from here.
make: execvp: /cygdrive/c/Users/leo/Desktop/android/android-ndk-r9d/prebuilt/windows-x86_64/bin/awk.exe: Not a directory
Android NDK: Host 'awk' tool is outdated. Please define NDK_HOST_AWK to point to Gawk or Nawk !
/cygdrive/c/Users/leo/Desktop/android/android-ndk-r9d/build/core/init.mk:377: *** Android NDK: Aborting. . Stop.
i had following all the step here https://developer.vuforia.com/resources/dev-guide/step-1-setting-development-environment-android-sdk and also crated the windows path for them but i still facing this problem .