cocos2d-x v3.6 for android, crash with string concatenation

On Cocos2d-x v3.6 this code:

string _nameImgBase="pedina";
string nameImg=_nameImgBase+"B.png";
auto img=Sprite::createWithSpriteFrameName(nameImg);

compiles without errors, but on Android crash the application. The strange thing is that if I compile the same code on XCode for iPhone … then there are no problems, everything is working. Why? thanks!

check if the ‘img’ is not nullptr.

I can’t the app crash on this line!

Hi, thanks to all! Now with cocos2d-x v3.7 and android studio I have found the problem, and is my fault! ;(