Cocos Creator SDKBOX integration in android studio

after installing Facebook and google play services in my cocos creator project I tried to build an apk but got some errors. I opened android studio and saw that :

AppActivity extends com.sdkbox.plugin.SDKBoxActivity
but SDKBOX was in red and on hovering over it the following message appeared:
cannot resolve symbol ‘sdkbox’

there is no import related to sdkbox in the file, so I am thinking maybe I need to import some file. but I need expert advice.

whats your cocos creator version?

@htlxyz, plz take a look.

my cocos creator version is 2.3.3 and i have integrated facebook and google play game services. i would like to mention that i haven’t followed the steps in the integration guide of the two plugins and have only integrated the plugins in the gui. the installation was successful for both of them.

com.sdkbox.plugin.SDKBoxActivity is included in skbox.jar, please make sure your proejct include sdkbox.jar.

I want to integrate sdkbox play and Facebook into my game in cocos creator. first I imported both the plugins into my project but since I don’t have a google app id, I deleted the build folder, rebuilt the projects and then imported just the Facebook plugin.
however my sdkbox_config.json still shows sdkboxplay entries, and even though I was able to compile and build an apk through android studio, it crashed upon opening on my device.
what could be wrong? my cocos creator version is 2.3.3, and I built using the default setting(not link).
I also want to know how to remove a sdkbox plugin from my project.
Another issue I have is that in my typescript code in the project I am using:


but sdkbox is not defined in my project and is underlined in red. however the android studio project still compiled.

how do I solve this?


sdkbox is not defined, this may be you haven’t not invoke sdkbox js binding api.

follow is register js binding api:

@htlxyz, @yinjimmy,
i integrated facebook into my project and now it is not compiling for android(i haven’t tested it on other platforms). when i imported the facebook plugin into my project, there was no error. i put


in appdelegate.cpp because there was no such macro definition anywhere.
i then built the project in cocos creator and then compiled it and got the following errors :
buildLogsFromCocosCreator.cpp (41.0 KB)

i then built the project in android studio and got the following errors :
buildLogsFromAndroidStudio.cpp (10.4 KB)

these files contain logs and are not script files as the file extensions might suggest.
i would like to add that in android studio, when i synced my project it wasn’t showing an error on the following line:

public class AppActivity extends com.sdkbox.plugin.SDKBoxActivity {

so i don’t know why i am getting the error in cocos creator that SDKBoxActivity is not recognised. i also checked that sdkbox.jar is in the lib folder.

please help.

  • SDKBOX_ENABLED is defined is on android platform.
  • SDKBoxActivty does not exist

SDKBoxActivty is defined is this jar, please make sure this jar is include, and compile into your proejct.