[SOLVED] Compile error when use SimpleAudioEngine / CocosDenshion?

Hi all. When i add this to my code:

CocosDenshion::SimpleAudioEngine::getInstance() -> preloadBackgroundMusic(“blabla.mp3”) ;

CocosDenshion::SimpleAudioEngine::getInstance() -> playBackgroundMusic(“blabla.mp3”, true);

And then i compile it with “cocos compile -p android --android-studio”. Error . Here is detailed error http://pastebin.com/cNPubyxu .

I try to use :

auto audio = SimpleAudioEngine::getInstance();
audio -> preloadBackgroundMusic(“blabla.mp3”);
audio -> playBackgroundMusic(“blabla.mp3” , true );

The error is still same. I do not forget about adding #include “SimpleAudioEngine.h”

I am using python 2.7.13 , NDK r13 , apache-ant-1.10.0 , SDK Manager revision 24.4.1, and Cocos 2d-x-3.14

Here is the full code of HelloWorld.cpp http://pastebin.com/TySVvWjY

==============================================================

PROBLEM SOLVED!

I can build to android use :

cocos compile -s folder project -p android -m release -o targetfolder

I think this was fixed in 3.14.1?

Try specifying app-abi:

cocos run -p android --android-studio --app-abi armeabi

Still with same error. I think the problem is not compatible with NDK r13 [?] beacause i see many text that saying “Android-ndk-13/blabla/blabla” in error text .

BTW, what version of NDK do you use?

In my case:

Pkg.Desc = Android NDK
Pkg.Revision = 13.1.3345770

stiil error when i am using cocos 2d x 3.14.1
have anyone checked my code?

Can you try playing background music without preloading?

umm… still error …

hai @piotrros , can you compile my hellowordscene.cpp? build to android

https://drive.google.com/file/d/0B8MDQ_hp245qUXhfOWhtcWNLSWs/view?usp=sharing

maybe the problem is my computer or file missing [?]

==============================

Problem Solved! :smile:

I can build to android use :

cocos compile -s folder project -p android -m release -o targetfolder

Thanks everyone who respond my question :slight_smile: