I’m just getting started using Ubuntu to develop Android project with Cocos2d-x recently.
I cloned the lastest Cocos2d-x code from GitHub, and installed the Android NDK r8.
Then I compiled hello-jni with no problem.
So I used create-android-project.sh inside by creating a test project, then success.
But when I used ./build_native.sh compiled the project when an error.
The error is as follows:
Compile++ thumb : cocosdenshion_static <= SimpleAudioEngineJni.cpp
Compile++ thumb : cocosdenshion_static <= OpenSLEngine.cpp
/home/zhonglong/cocos2d-2.1beta3-x-2.1.0/mycocos2d/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp:292:23: error:
expected expression
(player->audioSrc) = {&loc_fd, &format_mime};
^
Is that someone can help me?
Try Changing this line
To this and see if it works