SDKBOX Integration without the Installer

Do u have documentation to integrate SDKBOX without the Installer ,
and documentation for eclipse integration ?

Can I ask why you need to do this? Is it due to problems with the installer?
I have copied the files into the correct location as the v.1.2.0.1 installer fails every time. No success though, I still get the error “ERR: SDKBox IAP: failed to get configuration”

with installer i got this error

"failed to find cocos2d-x installation directory
Installation failed :("

and its better to add the SKDBOX your self ,coz i only wanna add SKDBOX to Android .

Yes, I get the same error. If I use sdkbox list it shows the latest v.1.2.0.1 as being installed, however it did not copy both the plug in frame works to where it should have.
This is annoying as I understand how to implement in app in obj -c, but not android. Hence the reason for sdkbox, but I can’t get anywhere with the new installer. Previous version installed ok, but ::init fails :frowning: with the error I mentioned earlier.
So completely stumped. I may have to just take it out and go back to using soomla :frowning:

  1. download sdkbox installer.
  2. extract sdkbox.zip
  3. copy extracted files into cocos2d game root folder.
  4. make sure that your cocos2d game path is on c drive.
    5)open command promt and direct to sdkbox path in your cococs2d game’s root folder.
    6)sdkbox import iap
    then u will see :slight_smile: symbol after installation. when run import command may be ask new version is avialble. if u nee new version type yes else type no.
    in 6th step i write sdkbox import iap because i need to add in app purchase.
    ----------sample-------------
    if u need to add adcolony plugin use- sdkbox import adcolony

Thank you ,but i need to do it my self and they used to have documentation for that but now they only have one for The Installer.

doc.zip (564.9 KB)
check this zip file it may be useful for u. iam not sure.

can you try run the following command

sdkbox import <plugin_name> -vv

And @mannewalis can help you with it.

Can you post your error message with

sdkbox import iap -vv

This error means you’ve already integrated SDKBOX IAP, but most possibly didn’t change Cocos2dxActivity.java

Im getting this error, What to do ??

hi,
How to remove that error?? and to make the Installation Successful?
And what about the "Failed to find cocos2d-x installation directory ??

Thanks in advance

this error mostly occur when u try to import sdk from outside cocos2d x root directory

1 Like

Not working ,it easier for me to add them manually ,Please re upload the old documentation .

@Kotaiba I am sure we can send you manual steps to do the installation. In the mean time, since you are having an issue, and we would like to solve this issue, would you mind helping us with a few tests so that we can solve this issue for others that may run into the same thing :smile:

  1. run sdkbox symbols from the cocos project directory that you are trying to install to. This will print out a bunch of keys and values. Can you reply to this post with that output?

  2. run sdkbox --help and paste all output including the sdkbox header with version number.

With this information we should be able to diagnose the problem and get you back into a working state. If not, I will find instructions on how to install this manually.

Thanks
Justin

1-

sdkbox symbols
 _______ ______  _     _ ______   _____  _     _
 |______ |     \ |____/  |_____] |     |  \___/ 
 ______| |_____/ |    \_ |_____] |_____| _/   \_
Copyright (c) 2015 Chukong Technologies Inc. v0.5.6.9

failed to find cocos2d-x installation directory
Installation failed :(

2-

sdkbox --help
 _______ ______  _     _ ______   _____  _     _
 |______ |     \ |____/  |_____] |     |  \___/ 
 ______| |_____/ |    \_ |_____] |_____| _/   \_
Copyright (c) 2015 Chukong Technologies Inc. v0.5.6.9
usage: sdkbox [-h] [-v] [-p [PROJECT]] [-s] [-b [PLUGIN]] [-D SYMBOL]
              [-o OUTPUT] [--encrypt ENCRYPT] [--decrypt DECRYPT] [--key KEY]
              [--dryrun] [--nohelp] [--forcedownload]
              {list,import,restore,symbols,api,update,encrypt,decrypt}

Import SDKBOX plugins into Cocos2d-x projects

positional arguments:
  {list,import,restore,symbols,api,update,encrypt,decrypt}
                        issue sdkbox installer command

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         specify verbosity level
  -p [PROJECT], --project [PROJECT]
                        path to project root (defaults to .)
  -s, --status          checks the server for update status
  -b [PLUGIN], --plugin [PLUGIN]
                        specify path to plugin (defaults to .)
  -D SYMBOL, --symbol SYMBOL
                        define a symbol for the package script
  -o OUTPUT, --output OUTPUT
                        specify output file
  --encrypt ENCRYPT     encrypt file
  --decrypt DECRYPT     decrypt file
  --key KEY             specify xxtea key (Key must be a 16-byte string.)
  --dryrun              display steps but do not perform any actions.
  --nohelp              don't open online documentation after installation.
  --forcedownload       force download of package even if it is already downloaded.

Examples:
# Add 'In App Purchase' plugin to your game
$ sdkbox import -b iap -p /path/to/your/cocos2dx/game/

# The -b option may be omitted and -p too if you are in your project directory
$ sdkbox import iap

# List all available modules
$ sdkbox list

I just finished integrating all the the SDKs except Google analytics need to know what to add to AndroidManifest.xml

This is screenshot of my project tree

can you check if there is a .cocos-project.json in your project directory?

if not, can you add it with the following contents. And try the sdkbox install again.

{
    "engine_type": "prebuilt", 
    "engine_version": "cocos2d-x-3.7", 
    "project_type": "cpp"
}

If this works, then the question becomes why don’t you have that file. How did you create the project? cocos new -l cpp project ?

Thanks
Justin

I use level helper to create my project . cocos2d-x 3.4
http://gamedevhelper.com/
if you create project via it i think you will face same problem .
i dont have cocos-project.json on my files .
can you point for me where it should be ?

I am having the same exact issues.

I have an old project built with cocos2d-x 3.1 and updated many times up to the 3.6 version. So, there is no .cocos-project.json file inside the main project directory.

Using the sdkbox installer tools from the root dir of the project used to give me the common failed to find cocos2d-x installation directory error.

I’ve previously run the ./setup.py from the root project dir, but with no success.

Then I’ve solved the issue doing this:

  1. Removed all the cocos2d-x-related settings from my .bashrc or .zshrc file in my user’s home directory
  2. Downloaded cocos2d-x 3.6 source code and extracted it in a place where I will keep it for the rest of my life :smile:
  3. Run ./setup.py from the cocos2d-x 3.6 source code directory
  4. Restarted the terminal
  5. Run sdkbox symbols from the root dir of the project and now it works!

Hope this helps!