Android NDK and cygwin : incorrect path? - android

I have the following in my ".bashrc"
export ANDROID_SDK=/cygdrive/c/adt-bundle-windows-x86_64/sdk
export ANDROID_NDK=/cygdrive/c/android-ndk-r8d
export PATH=$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$ANDROID_NDK
When I build the project it fails with the error below.
Android NDK: No local settings... build all in release mode !
Android NDK: ERROR:/home/XXX/jni/Android.mk:gcc: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that //c:/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/libgcc.a exists or that its path is correct
/cygdrive/c/android-ndk-r8d/build/core/prebuilt-library.mk:43: *** Android NDK: Aborting . Stop.
Using the shell I can see that
//c:/ android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/libgcc.a"
cannot be found, yet
/cygdrive/c/ android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/libgcc.a
can be found. So the question is why is the NDK expanding the drive/path like this? (you can see it does not always do this see the last line of the error)
Is there a fix?

Related

Build CommonCrypto from source?

My client is requesting I package CommonCrypto inside their app and not use the version supplied by the OS.
I haven't found any pre-built distributions, but I found the source code (sans build instructions). Is there a simple way to build from source?
I tried using ndk-build, but I see the following error:
Android NDK: ERROR:Android.mk:corecrypto: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that /SWE/release/Software/Harissa/Updates/BuiltHarissa/Roots/corecrypto/prebuilts/armeabi-v7a/libcorecrypto.so exists or that its path is correct
/Users/rajohns/Library/Android/sdk/ndk/21.0.6113669/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting . Stop.
And as seen in the Android.mk file, the corecrypto module does in fact point to an unknown /SWE/release/Software/Harissa/Updates/BuiltHarissa/Roots/corecrypto directory.

Android NDK:Aborting

I have installed ndk correctly when working with previous projects.I have downloaded now openpeer library for Android. When I load the openpeer sdk, I get the following:
14:59:28 ** Clean-only build of configuration Default for project openpeer-android-sdk **
"D:\android-ndk-r8e\ndk-build.cmd" NDK_DEBUG=1 clean
2 [main] pwd 4928 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer. Please report this problem to
the public mailing list cygwin#cygwin.com
Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: /cygdrive/d/Android Workspace/openpeer-android-sdk/jni/Android.mk
D:/android-ndk-r8e/build/core/add-application.mk:165: * Android NDK: Aborting... . Stop.
14:59:28 Build Finished (took 330ms)
I also got an error in the project but all of the files appear without any error signs. Please advise
I think you have a problem with the NDK_PROJECT_PATH environment variable..
Are you compiling over cygwin? what is the cygwin connection?
He tries to find some file at this path : /cygdrive/d/Android Workspace/openpeer-android-sdk/jni/Android.mk

Android: ndk-build is returning nothing?

I'm trying to rebuild my Native android project, however all of a sudden, ndk-build decides it doesn't want to, and seems to be sulking on me.
Here's my output:
nathan#nathan-K52F:~/COMBAT/engine/android-build$ android update project -p . -t 1 -s
Updated project.properties
Updated local.properties
Updated file ./proguard-project.txt
nathan#nathan-K52F:~/COMBAT/engine/android-build$ cd jni && ndk-build
nathan#nathan-K52F:~/COMBAT/engine/android-build/jni$ ndk-build
nathan#nathan-K52F:~/COMBAT/engine/android-build/jni$ cd ../
nathan#nathan-K52F:~/COMBAT/engine/android-build$ ndk-build
nathan#nathan-K52F:~/COMBAT/engine/android-build$ //should be erroring here - yet nothing?
It however at least tries to build another native project:
nathan#nathan-K52F:~/GamePlay/samples/browser/android/jni$ ndk-build
/home/nathan/android-ndk-r8e/build/core/add-application.mk:128: Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion 9 in /home/nathan/GamePlay/samples/browser/android/AndroidManifest.xml
Android NDK: ERROR:/home/nathan/GamePlay/samples/browser/android/jni/Android.mk:gameplay: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that /home/nathan/GamePlay/samples/browser/android/jni/../../../../gameplay/android/obj/local/armeabi/libgameplay.a exists or that its path is correct
/home/nathan/android-ndk-r8e/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting . Stop.
nathan#nathan-K52F:~/GamePlay/samples/browser/android/jni$
The error's are suppose to be there by the way.
I just haven't a clue why it isn't compiling the project I WANT it to compile - I don't think it likes me anymore :L
I'm running on the latest Ubuntu OS, with NDK r8 and JDK 1.7
I didn't add my the new files to my makefile to be compiled.

Android ndk-build command does nothing

I have a similar question to that posted here:
Android NDK: why ndk-build doesn't generate .so file and a new libs folder in Eclipse?
...though I am running Windows 7, not Mac os. Essentially the ndk-build command is run, gives no error but doesn't create an .so file (also, since I'm on windows this should create a .dll and not an .so?). I tried running the command from the root, jni, src folders etc. but got the same result; cmd just returns to the prompter after a few seconds. I ran it again from the jni folder with NDK_LOG=1 parameter to see what was happening. Here is a portion of the transcript of the log results after running ndk-build in the jni folder (after it successfully identified the platform, etc.)...
Android NDK: Looking for jni/Android.mk in /workspace/NdkFooActivity/jni
Android NDK: Looking for jni/Android.mk in /workspace/NdkFooActivity
Android NDK: Found it !
Android NDK: Found project path: /workspace/NdkFooActivity
Android NDK: Ouput path: /workspace/NdkFooActivity/obj
Android NDK: Parsing /cygdrive/c/android-ndk-r8/build/core/default-application.mk
Android NDK: Found APP_PLATFORM=android-15 in /workspace/NdkFooActivity/project.properties
Android NDK: Application local targets unknown platform 'android-15'
Android NDK: Switching to android-14
Android NDK: Using build script /workspace/NdkFooActivity/jni/Android.mk
Android NDK: Application 'local' is not debuggable
Android NDK: Selecting release optimization mode (app is not debuggable)
Android NDK: Adding import directory: /cygdrive/c/android-ndk-r8/sources
Android NDK: Building application 'local' for ABI 'armeabi'
Android NDK: Using target toolchain 'arm-linux-androideabi-4.4.3' for 'armeabi' ABI
Android NDK: Looking for imported module with tag 'cxx-stl/system'
Android NDK: Probing /cygdrive/c/android-ndk-r8/sources/cxx-stl/system/Android.mk
Android NDK: Found in /cygdrive/c/android-ndk-r8/sources/cxx-stl/system
Android NDK: Cygwin dependency file conversion script:
...after which point it just runs the script mentioned in the last line, then terminates. Any ideas? Thanks!
Set up a builder. Refer to following article for how to do that:
http://maxters.net/2011/02/android-ndk-builder-for-eclipse-in-windows/
There is a "small" change beginning NDK r8 – Cygwin is not necessary anymore and I had a trouble when building native libraries with Cygwin and NDK r8 – there was some error message about cxx-stl...
Almost everything in the link above is OK, but leave Arguments in the Main tab blank and change Location to:
${env_var:ANDROID_NDK_ROOT}/ndk-build.cmd
I use system variable path ANDROID_NDK_ROOT, but you can provide a full path to the ndk-build.cmd.
Also, there is no need to set any variable in the Environment tab.
Set up your builder this way and you will be fine.
Just a note, Android is built on the top of the Linux OS, so even if you are on Windows you will get Linux libraries with .so extension.
Following link was instructive but missing a detail if you are configuring NDK support in Eclipse after CDT it already depricated (summer of 2017 already).
http://maxters.net/2011/02/android-ndk-builder-for-eclipse-in-windows/
Where you need to configure your external builder Location, instead of pointing to cygwin\bin\bash.exe and adding as Argument your ndk-build.cmd location this is what worked for me on Windows 7 and 10.
In "Edit Configuration" dialog for external builder do following:
- for Location -> specify where your "ndk-build.cmd" is. i.e "D:\Android\NDK\ndk-build.cmd"
- for Arguments -> just specify "all"
The NDK build system relies on wildcards to find the sources to compile. If you have a path wrong somewhere, it will find no sources and do nothing. Check Android.mk very carefully. More can't be said unless you post Android.mk and a description of the source tree.

Error while Installing Android NDK

I downloaded andless project from below link
http://code.google.com/p/andless/downloads/list
i am trying to install ndk for running above application and during installation this error is occurred. Please give any solution for remove this error.
Android NDK: There is no Android.mk under apps/lossless/project/jni
Android NDK: If this is intentional please define APP_BUILD_SCRIPT to
point Android NDK: to a valid NDK build script.
build/core/add-application.mk:143: * Android NDK: Aborting... .
Stop. iMac:android-ndk-r7$]1

Categories

Resources