Not able to build cocos2dx game for Android for cocos2dx 3.3 please help

I have cocos2dx 3.3b version and i have to build it for Android i am not able to do it . I have windows 8.1 pc and visual studio 2013 express edition and also i am creating project in cpp language.

what problem do you have exactly?

Hi Hzlove , Thanks for reply.

Initially i was using cocs2dx3.0 and i used to build my game which is build for win32 , for android , the procedure is here :-1: in eclips import the cocos2dx project select cocos2dxlib and project itself and import it
2. then convert the project into c\c++ nature
3.add files name in jni ->Android.mk file
4. then build the project using ndk , using build_native.py

this generates the apk file . I am doing the same but it is not working ,first of all it says that there is no python path found though it is installed and even i have given the path in environment variable as well
eg C:\Python and C:\Python\lib

But there no hint of APK file, if i am doing anything wrong please kindly correct me , or if you have any better way to generate apk file please tell me.

Thanks.
Bharat Soni.

I’m usually use cmd to build apk.
Would you try follow steps to build apk?

  1. open cmd
  2. locate YourProject/proj.android
  3. build_native.py
  4. ant clean release

no it is compiling my project but not creating any apk file

Any errors during step 3 and 4?
if no errors, apk should be in proj.android/bin after step 4.

This is the warning i am getting
Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersi
on 9 in ./AndroidManifest.xml

but no errors only warnings
and 4 step is not recognized as a internal or external command

then… how about this command

cocos compile -p android -m release -j 4 --ndk-mode release

-j 4 <-- this is number of cpu cores.

1 Like

It has created the APK file but when i am installing it to the BlueStacks it says INSTALL_PARSE_FAILD_NO_CERTIFICATE .

One more thing i have downloaded Fantasy worrier and trying to run it on visual studio 2013 express edition it shows error that" afxres.h ,atlbase.h and atlwin.h files are not found.

You need a keystore to publish.
But just for testing, try -m debug instead of -m release

1 Like

Thanks Hzlov ,

It worked , it will be really helpful if you explain me what was the problem and also the FantasyWorrior3D question .

I didn’t try anything for FantasyWorrior3D.

And, actually, I have not used eclipse for packaging.
It’s hard and painful for setting eclipse working.
All your settings were right if cocos compile ends with success.
Problem was just in eclipse setting.

1 Like

No problem !! Thanks for your help !!!