about upgrading new cocos2d-x version from 0.9.2 to 0.10.0 !!!

Hi,

I want to upgrade my android game “ChickenEggs” with new and hot version of cocos2d-x to see if it fixed some crash or audio problems.

But when I unzip and replace cocos2dx and CocosDenshion folders under libs as usual.

I have got a compiled error after executing the build_native.sh .

It seems it can’t find the -lcurl library.

So I compare the 0.9.2 and 0.10.0 libraries folders.

I found there is a difference between them, under 0.9.2, libcurl.a lies on cocos2dx\platform\third_party\android\libraries but under 0.10.0, there are several folders on that, such as armeabi, armeabi-v7a and x86.

When I enter these folders, I can find the libcurl.a there, I know the x86 maybe not the solution for me.

But as armeabi and armeabi-v7a, which one that I should used for ?

If anybody knows it, give me a light, thank you.

You should also replace cocos2dx/Andorid.mk.
I suggest you using the new version entirely, not part of it.

I am sure I also replace the cocos2dx/Android.mk.

Here is my process,

  1. delete the 0.9.2 cocos2dx and CocosDenshion entirely.(actually, I only have these two folders under my project libs folder).

  2. copy the 0.10.0 cocos2dx and CocosDenshion folders and paste them to my project\libs.

  3. execute build_native.sh

I have tried to copy armeabi.a to libraries and it compiled ok.

Maybe that just the way I need to go ?

Thank you for your rapidly reply. ^^

You should change YOUR_PROJECT_ROOT/andorid/jni/helloworld/Andorid.mk like cocos2dx/Android.mk.
Replace

 $(LOCAL_PATH)/../../cocos2dx/platform/third_party/android/libraries/ 

to

 $(LOCAL_PATH)/../../cocos2dx/platform/third_party/android/libraries/$(TARGET_ARCH_ABI))

hi,

where exactly the line should be changed ?

I change from

LOCAL_LDLIBS := ~~L$/…/…/libs/armeabi) ~~lcocos2d lloglcocosdenshion ~~L$/…/…/…/libs/cocos2dx/platform/third_party/android/libraries)~~lcurl

to

LOCAL_LDLIBS := ~~L$/…/…/libs/armeabi) ~~lcocos2d lloglcocosdenshion ~~L$/…/…/…/libs/cocos2dx/platform/third_party/android/libraries$))~~lcurl

but it still failed on compile.

I don’t know your file structure, take HelloWorld as example, you should change HelloWorld/android/jni/helloworld/Andorid.mk.

I followed the instructions about hybrid iphone and android project settings.

Here is my project folder structure :

My Project
—android
—~~jni
——helloworld
———Android.mk
———main.cpp
——Android.mk
—Classes
—ios
—libs
—~~cocos2dx
——platform
———third_party
———~~android
————libraries
—————armeabi
—————armeabi-v7a
—————x86
—~~CocosDenshion
—Resources

BTW, I don’t list every folders in detail, just those I think related.

Thank you in advance.

What I means is adding /$(TARGET_ARCH_ABI at the end of library path.
Your structure is different from HelloWorld, cocos2dx is under libs, so you can not paste what I pasted, just modify it.
You should know the meaning of the modification.