How can I build my project with Android NDK on windows? - android

I try to run my project in windows. Project use android ndk. I install Cygwin and add "C:\cygwin\bin" in PATH. Instal GnuMake, and set variable GNUMAKE = /cygdrive/c/Art/GnuMake/bin/make.exe. Also I add native support to my project in Eclipse.
When I try run this project, Eclipse Show:
**** Build of configuration Default for project FFWall ****
C:\cygwin\bin\bash.exe C:\Art\android-ndk\ndk-build V=1
make: *** No targets specified and no makefile found. Stop.
ERROR: Your GNUMAKE variable is defined to an invalid name: /cygdrive/c/Art/GnuMake/bin/make.exe
Please fix it to point to a valid make executable (e.g. /usr/bin/make)
**** Build Finished ****
How I can resolve this issue?

I guess you are using the GNU's Make.exe, try the make.exe present in the Cygwin's bin folder.

Use GNUMAKE = C:\cygwin\bin\bash.exe It`s working for me

Related

Getting error while executing the ./build_native.sh from Cocos2d-x Android-Project

I'm getting error while executing the android-project created on Cocos2d-x, The error is:
$ ./build_native.sh
NDK_ROOT = D:\Updated Eclipse\android-ndk-r10
COCOS2DX_ROOT = /cygdrive/d/Cocos2d-x/cocos2d-x-2.2.5/projects/MyApp/proj.android/../../..
APP_ROOT = /cygdrive/d/Cocos2d-x/cocos2d-x-2.2.5/projects/MyApp/proj.android/..
APP_ANDROID_ROOT = /cygdrive/d/Cocos2d-x/cocos2d-x-2.2.5/projects/MyApp/proj.android
Using prebuilt externals
ERROR: You are using a non-Cygwin compatible Make program.
Currently using: D:/Cocos2d-X/Cygwin/bin/make
To solve the issue, follow these steps:
1. Ensure that the Cygwin 'make' package is installed.
NOTE: You will need GNU Make 3.81 or later!
2. Define the GNUMAKE environment variable to point to it, as in:
export GNUMAKE=/usr/bin/make
3. Call 'ndk-build' again.
I have installed all the required SW and set the path, environment etc properly,
Cocos2d-x version: Cocos2d-x-2.2.5
Android ADT: Latest Android SDK
Android NDK: android-ndk-r10
Cygwin: 32-bit
Cygwin package installed autoconf, automake, binutils, gcc-core, gcc-g**, gcc4-core, gcc4-g**, gdb, pcre, pcre-devel, gawk, make
Python: python-2.7.8.msi
The Path and environment are:
ANDROID_NDK_PATH C:\Users\d\Documents\Android\ndk\android-ndk-r8d
COCOS2DX_ROOT D:\Cocos2d-X\cocos2d-x-2.2.5
GNUMAKE /usr/bin/make
NDK_PROJECT_PATH D:\Cocos2d-X\cocos2d-x-2.2.5\projects
NDK_ROOT D:\Updated Eclipse\android-ndk-r10
Path D:\Cocos2d-X\Cygwin\bin
Please help me to fix this issue.
Thanks
Your NDK is in a folder "Updated Eclipse". You need to rename your folder such that it does not have any space. After renaming, update your NDK path in "build_native.sh" and then try rebuilding.

setting Android NDK giving error : Your APP_BUILD_SCRIPT points to an unknown file

I'm running a sample application given in android-ndk, i have done basic settings like setting NDK Path at windows->preferences->android->NDK . Adding native support into project, included directories at c/c++ genereal-> paths and symbols -> includes but project is still showing error , if i clean the project it will generate error shown below . Any one knows what this errors means and what is the solution for this?
**** Clean-only build of configuration Default for project HelloJni ****
F:\android-ndk-r9-windows-x86\android-ndk-r9\ndk-build.cmd clean
Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: ;F:\android-ndk-r9-windows-x86\android-ndk-r9/jni/Android.mk
F:/android-ndk-r9-windows-x86/android-ndk-r9/build/core/add-application.mk:176: *** Android NDK: Aborting... . Stop.
**** Build Finished ****
Seems like ndk-build looks for jni/Android.mk under NDK directory and it is clearly wrong. Before running ndk-build, you should change your directory to project directory. For ease of use, add NDK directory to Path in your environment variables first, then change your directory to project directory and run ndk-build then. Like (assuming NDK directory is added to environment variables):
cd F:\path\to\project
ndk-build

cocos2d-x android develoement - ./build_native.sh giving error in windows 7

I am not able to get rid of this error when I start compiling helloCpp with ndk. I am given proper permission to all users. Please can any one give clue? I included NDK_ROOT also in system variables.
dell#dell-PC /cygdrive/C/cocos2d-x/samples/Cpp/HelloCpp/proj.android
$ ./build_native.sh
NDK_ROOT = /cygdrive/C/android-ndk-r8e
COCOS2DX_ROOT = /cygdrive/C/cocos2d-x/samples/Cpp/HelloCpp/proj.android/../../../..
APP_ROOT = /cygdrive/C/cocos2d-x/samples/Cpp/HelloCpp/proj.android/..
APP_ANDROID_ROOT = /cygdrive/C/cocos2d-x/samples/Cpp/HelloCpp/proj.android Using prebuilt externals
++ /cygdrive/C/android-ndk-r8e/ndk-build -C /cygdrive/C/cocos2d-x/samples/Cpp/HelloCpp/proj.android NDK_MODULE_PATH=/cygdrive/C/cocos2d-x/samples/Cpp/HelloCpp/proj.android/../../../..:/cygdrive/C/cocos2d-x/samples/Cpp/HelloCpp/proj.android/../../../../cocos2dx/platform/third_party/android/prebuilt
make.exe: *** /cygdrive/C/cocos2d-x/samples/Cpp/HelloCpp/proj.android: No such file or directory. Stop.
Follow this tutorial here.
Include these in path and symbols <- C/C++ General<- Properties <- Right Click on Project
Browse and set where you have your NDK Installed.
/Library/Android/android-ndk-r8/sources/cxx-stl/gnu-libstdc++/include
/Library/Android/android-ndk-r8/platforms/android-8/arch-arm/usr/include
/Library/Android/android-ndk-r8/sources/cxx-stl/system/include
/Library/Android/android-ndk-r8/sources/cxx-stl/gabi++/include
Under Build->Toolchain Select Android Gcc -> make then reset the
variable under C/C++ build -> build command
reset it to
bash ${workspace_loc:/YOURPROJECTNAME}/build_native.sh NDK_DEBUG=1 V=1
Don't forget to change the project name in the build command.

FFTW Build Android

I just follow this sophisticated and nice manual
compiling fftw3 in android ndk
I succesfully build config.h file but in this next step with Android.mk:
IAm stack becouse I try build this and Console says:
12:53:23 **** Incremental Build of configuration Default for project F ileBroswerActivity ****
sh "C:\\Users\\Peťulka\\Desktop\\android-ndk-r5b-windows\\android-ndk-r5b\\ndk-build" all
Invalid attribute name:
package
/c/Users/Peťulka/Desktop/GUI/FileBroswer/jni/Android.mk:2: /fftw3/project/jni/Android.mk: No such file or directory
/c/Users/Peťulka/Desktop/GUI/FileBroswer/jni/Android.mk:2: /fftw3/project/jni/Android.mk: No such file or directory
make.exe: *** No rule to make target `/fftw3/project/jni/Android.mk'. Stop.
12:53:29 Build Finished (took 6s.316ms)
But I have this ANdroid.mk file ! in this path I check my project 10 times, I dont know where i s problem.,

build Qualcomm's FastCV sample

I try to build the Qualcomm's FastCV sample fastcorner. I add the project file into Eclipse, and follow the instruction to "add C/C++ attributes to the project" using "Convert to a C++ Project". I got nothing in the
I try to clean the project, got follow errors:
**** Clean-only build of configuration Default for project FastCVSample ****
make clean
Host OS was auto-detected: windows
gawk.exe": fatal: can't open source file "/cygdrive/d/Android/android-ndk-r7/build/awk/check-awk.awk" for reading (No such file or directory)
/cygdrive/d/Android/android-ndk-r7/build/core/init.mk:258: *** Android NDK: Aborting. . Stop.
Android NDK: Host 'awk' tool is outdated. Please define HOST_AWK to point to Gawk or Nawk !
make: *** [clean] Error 2
make[1]: Entering directory `/cygdrive/d/Android/fastcv-android-1-0-3/samples/fastcorner'
make[1]: Leaving directory `/cygdrive/d/Android/fastcv-android-1-0-3/samples/fastcorner'
Makefile:57: recipe for target `clean' failed
**** Build Finished ****
It seems eclipse can not find "awk", but I can successfully execute awk in cygwin, and I also set the C/C++ build envirement variable in "HOST_AWK" in eclipse, nothing helps.
Is there anyone know what should I do?
I had the same problem on ndk-r7 and I had to rename ndk/prebuild/windows/bin/awk.exe to _awk.exe.
In ndk-r7b I don't have this issue.

Categories

Resources