Did a project on the cocos2d-x for ios. Now try to run it for android.Sobirayu using eclipse. Eliminated like all the mistakes and now he writes:
**** Build of configuration Default for project Cut2 ****
bash /Users/Banck/cocos2d-x-2.2-2.1/projects/Cut2/proj.android/build_native.sh
NDK_ROOT = /Users/Banck/Downloads/android-ndk-r9b
COCOS2DX_ROOT = /Users/Banck/cocos2d-x-2.2-2.1/projects/Cut2/proj.android/../../..
APP_ROOT = /Users/Banck/cocos2d-x-2.2-2.1/projects/Cut2/proj.android/..
APP_ANDROID_ROOT = /Users/Banck/cocos2d-x-2.2-2.1/projects/Cut2/proj.android
Using prebuilt externals
Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 8 in ./AndroidManifest.xml
Android NDK: WARNING:/Users/Banck/cocos2d-x-2.2-2.1/projects/Cut2/proj.android/../../../cocos2dx/Android.mk:cocos2dx_static: LOCAL_LDLIBS is always ignored for static libraries
make: Entering directory `/Users/Banck/cocos2d-x-2.2-2.1/projects/Cut2/proj.android'
[armeabi] Install : libcocos2dcpp.so => libs/armeabi/libcocos2dcpp.so
make: Leaving directory `/Users/Banck/cocos2d-x-2.2-2.1/projects/Cut2/proj.android'
**** Build Finished ****
And that takes a message you need to fix what is wrong.But what's wrong? It seems to be all right already ... Advice please
It seems ok, you just need to use this 'ant debug' command to generate an .apk package for you.
Related
I am totally new to programming.
I am using windows 7 and eclipse.
I have searched all the place and i have tried all of the recommended solution and nothing works for me. Please let me know how to change them.
So please help me to understand what you are trying to say.
The cocos version i am using is 3.3 (cocos2d-x-3.3)
NDK is version r9D
Thank you.
I am not sure why CDT Build console is giving me these errors.
"
**** Build of configuration Release for project KIKILA ****
python C:/Users/SM/workspace/KIKILA/build_native.py -b release all
Android NDK: WARNING: APP_PLATFORM android-15 is larger than android:minSdkVersion 8 in ./AndroidManifest.xml
Android NDK: WARNING: Ignoring unknown import directory: jni/../../cocos2d
Android NDK: WARNING: Ignoring unknown import directory: jni/../../cocos2d/external
Android NDK: WARNING: Ignoring unknown import directory: jni/../../cocos2d/cocos
Android NDK: C:\apps\adt-bundle-windows-x86_64-20140702\cocos\cocos2d-x-3.3\external/flatbuffers/Android.mk: Cannot find module with tag 'external/jansson' in import path
jni/Android.mk:41: *** Android NDK: Aborting. . Stop.
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Traceback (most recent call last):
File "C:/Users/SM/workspace/KIKILA/build_native.py", line 159, in <module>
Android NDK: The following directories were searched:
build(opts.ndk_build_paSM,opts.android_platform,opts.build_mode)
File "C:/Users/SM/workspace/KIKILA/build_native.py", line 146, in build
do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode)
File "C:/Users/SM/workspace/KIKILA/build_native.py", line 82, in do_build
raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!")
Exception: Build dynamic library for project [ C:\Users\SM\workspace\KIKILA ] fails!
Android NDK:
make.exe: Entering directory `C:/Users/SM/workspace/KIKILA'
make.exe: Leaving directory `C:/Users/SM/workspace/KIKILA'
The Selected NDK toolchain version was 4.8 !
**** Build Finished ****
The problem was due to the build_native.py script.
The build_native.py hasn't been maintained for ages and it has been deprecated. So you can't rely on it to build your Android project. But Cocos guys haven't make it clear to developers.
Try use cocos run command instead.
You could run the following command to build and run your project.
cd KIKILA
cocos run -p android
Before running the cocos command, you might need to configure it:
cd COCOS2DX_ROOT(your cocos2d-x folder)
python setup.py
Hello I am new to Android and I am trying to build the hello-jni sample that is included in the NDK but I get the error below, any idea how to fix it?
15:57:10 ** Build of configuration Default for project HelloJni **
/media/Project/adt-bundle-linux-x86-20131030/adt-bundle-linux-x86-20131030/android-ndk-r9c/ndk-build
all Android NDK: WARNING: APP_PLATFORM android-19 is larger than
android:minSdkVersion 3 in ./AndroidManifest.xml [armeabi-v7a]
Compile thumb : hello-jni <= hello-jni.c arm-linux-androideabi-gcc:
error trying to exec
'/media/Project/adt-bundle-linux-x86-20131030/adt-bundle-linux-x86-20131030/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/as':
execv: Exec format error make: *
[obj/local/armeabi-v7a/objs/hello-jni/hello-jni.o] Error 1
15:57:10 Build Finished (took 230ms)
This is what I am using:
Ubuntu 10.04.4
ADT bundle for linux (v22.3.0-887826)
NDK r9c
Thanks in advance
The WARNING is correct, and should be ignored.
Regarding the gcc error, you probably have a problem with installation of NDK. How did you unpack it? Check
ls -l /media/Project/adt-bundle-linux-x86-20131030/adt-bundle-linux-x86-20131030/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/arm-linux-androideabi/bin/as
This should be a symbolic link to ../../bin/arm-linux-androideabi-as, and both should have executable permissions.
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
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.
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.,