I want to use in app billing in my android app, for doing this i tried to work with cocos2d-x/plugin-x, but i didn't succeed to integrate it.
I followed this wiki , and i have this message:
Android NDK: /Users/yagoub/XXXX/XXXX/proj.android/../cocos2d/cocos/ui/Android.mk: Cannot find module with tag 'protocols/android' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
make: Entering directory `/Users/yagoub/XXXXXX/XXXXXXXX/proj.android'
jni/Android.mk:47: *** Android NDK: Aborting. . Stop.
make: Leaving directory `/Users/yagoub/XXXXXX/XXXXXXXXXX/proj.android'
Error running command, return code: 2
Could you please explain to me the steps for doing that correctly?
Thank you for your time and consideration.
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
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?
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.
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