Undefined reference to SDKBox when exporting with Android Studio

Undefined reference to SDKBox when exporting with Android Studio
0.0 0


I just did a fresh build from Cocos Creator (after upgrading to 1.6.2 it asked me to delete my build path). Along the process, I installed SDKBox’s IAP plugin (build, install sdkbox, build).

  • The Android Studio (3.0) project doesn’t compile – this is the error message:

    > Expected output file at ./obj/local/armeabi-v7a/libcocos2djs.so for target cocos2djs but there was none
  • Some fiddling around (clean build, etc.) gave me this error message:

    Error:error: undefined "reference to 'sdkbox::IAP::purchase(std::string const&)'"
  • Also, strangely, the ‘build’ button in Cocos Creator becomes disabled whenever I built – how do I re-build the Android Studio project when I made changes in Cocos Creator?

  • While building something with IAP / SDKBox, Cocos Creator gives this error message:

    ReferenceError: msg is not defined at Object.a [as sendMsgToSBWin]
  • I’m also not sure whether it’s ‘safe’ to upgrade to Gradle 4.1 (which Android Studio suggests me to do).

Thanks for your help! :slight_smile:


This is what my build window looks like. It also never finishes building, it gets stuck at ‘custom build process’.


This is the error message in Cocos Creator’s log:



Got the same problem, anyone help?


u need to import your plugins again.