Proper config to build proper apk's

I believe we need some engineering guy to share with us a proper configuration to build, debug apk’s with success. The different configurations I tried either fail to debug or build with audio delay/errors.

My basic config:
PROP_COMPILE_SDK_VERSION=19
PROP_MIN_SDK_VERSION=15
PROP_TARGET_SDK_VERSION=19
PROP_APP_PLATFORM=15
PROP_APP_ABI=x86

ndk 16b, Android Studio 3, cocos2d-x 3.16.

Thanks in advance.

@slackmoehrle

Let me ask our engineering team what the best config is.

@hgokturk please read the doc/RELEASE_NOTES.md of v3.16, it says it is tested with

- Android Studio 2.3.3
- NDK r14

NDK and Android Studio continue releasing new versions after cocos2d-x released, can not make sure they could work.

Did you want to build for simulator instead of Android devices? And what’s wrong of your error log?

I don’t think it has something with audio delay.

Alright then I’ll try 3.16 with ndk 14. I tried x86 & armeabi-v7a for physical device; both play audio with delay.(3.16, ndk 16b, target & compile sdk 19, min sdk 15). With configuration 3.15 & ndk 11c it works without any problem but fails to debug.

Did you mean in v3.16, audio is delayed? Did you use Audio engine or simple audio engine?

Yes. I tried both and both play with delay.(I should have been a poet with this rhymes :smiley: )

@dumganhar please take a look?

Did you try 3.15 & ndk 14 or ndk 16b?
I compared the audio code between 3.15 & 3.16, there only were some bug fixes which should not result in this delay problem.

I did try 3.15 with ndk 16b and it delays the audio. I haven’t tried ndk 14 yet.

So it’s because of NDK version?
I have no idea about that now. Is the delay obvious?

I guess it is about the ndk version. The delay is pretty obvious like a second almost. I’ll try it soon and share the result.

I guess i found out the problem which causes the delay.

This is with NO delay:

auto animWithDelayE = Sequence::create(DelayTime::create(0.5f), this->playTap, this->move_ease_in_out, nullptr);
logoE->runAction(animWithDelayE);
auto animWithDelayE2 = Sequence::create(DelayTime::create(0.8f), this->playTap->clone(), this->move_ease_in_out->clone(), nullptr);
logoE2->runAction(animWithDelayE2);
auto animWithDelayI = Sequence::create(DelayTime::create(1.1f), this->playTap->clone(), this->move_ease_in_out->clone(), nullptr);
logoI->runAction(animWithDelayI);
auto animWithDelayK = Sequence::create(DelayTime::create(1.4f), this->playTap->clone(), this->move_ease_in_out->clone(), nullptr);
logoK->runAction(animWithDelayK);
auto animWithDelayM = Sequence::create(DelayTime::create(1.7f), this->playTap->clone(), this->move_ease_in_out->clone(), nullptr);
logoM->runAction(animWithDelayM);
auto animWithDelayL = Sequence::create(DelayTime::create(2.0f), this->playTap->clone(), this->move_ease_in_out->clone(), nullptr);
logoL->runAction(animWithDelayL);

And this is WITH delay:

auto animWithDelayE = Sequence::create(DelayTime::create(0.5f), this->playTap, this->move_ease_in_out, nullptr);
auto animWithDelayE2 = Sequence::create(DelayTime::create(0.8f), this->playTap->clone(), this->move_ease_in_out->clone(), nullptr);
auto animWithDelayI = Sequence::create(DelayTime::create(1.1f), this->playTap->clone(), this->move_ease_in_out->clone(), nullptr);
auto animWithDelayK = Sequence::create(DelayTime::create(1.4f), this->playTap->clone(), this->move_ease_in_out->clone(), nullptr);
auto animWithDelayM = Sequence::create(DelayTime::create(1.7f), this->playTap->clone(), this->move_ease_in_out->clone(), nullptr);
auto animWithDelayL = Sequence::create(DelayTime::create(2.0f), this->playTap->clone(), this->move_ease_in_out->clone(), nullptr);

logoE->runAction(animWithDelayE);
logoE2->runAction(animWithDelayE2);
logoI->runAction(animWithDelayI);
logoK->runAction(animWithDelayK);
logoM->runAction(animWithDelayM);
logoL->runAction(animWithDelayL);

Strange, isn’t it?

I looked at your code, it’s all about Action.
so it’s not related to Audio?

Yes, I agree it’s about the action and not the audio.