SdkBox with pre-built

Hi,

I hope this will be an easy one. I have jumped through the hoops to understand how to generate pre build libs and build a project that uses them and I’m still learning… 3 days!! FFS.

Anyway, so I have my cocos2d-x directory with the pre-built libs in say at :

c:\dev\cocos2d\cocos2dx-3.14.1

Then I create a new project (remembering to exclude “-t binary” otherwise it does not generate proj.android-studio):

cocos new -l cpp ProjectName1 -d c:\dev\ProjectName1

Next I fix up all the project and gradle files and after maybe 30 mins I have a project which build and runs in android-studio.

Now I want to install an sdk box feature.
Where do I do this ? is it in the new project directory c:\dev\ProjectName1 or in the cocos2dx-3.14.1 directory?

I tried in the ProjectName1 directory and it gives me this error:

 #FATAL: [Error 3] The system cannot find the path specified: 'c:/dev/ThinkDog/cocos2d/cocos/platform/android/java/libs/'

… because I have deleted the cocos2d directory in c:\dev\ProjectName1 because it’s supposed to not be needed ???

Any help would be great… up hill struggle!

Thanks

I think I have figured this out, I re-created the cocos2d directory in my c:\dev\ProjectName1 folder and then copied in the “cocos”, “external” and “extensions” folders from my c:\dev\cocos2d\cocos2dx-3.14.1 directory.

After that running sdkbox in the c:\dev\ProjectName1 directory worked. I think now I just need to make sure that I have done the right thing? and presumably I can delete none header files but I don’t want to try that tonight.

No, this compiles but breaks when the app launches with an initialisation error. It’s been enough time now (4 days!). I give up.
I have worked with this engine now for about 3 months and even built a few apps. As it stands I’m stuck and just frustrated with very few replys coming to my posts. It’s not clear how once the library has been prebuilt how to continue working with SDKBOX. Please don’t think I’m having a rant, I’m not. I think the framework is great just difficult from me.

OK, so an update… it appears that if you are running against pre-built libs that are in a different directory to your project like I am, you need to update the “Cocos2dxActivity” class in the pre-built libs directory NOT in the project directory. That was my mistake. I think the documentation is a little confusing on how to do this especially when it comes to copying the librarys back from the project directory (where you ran sdkbox import) to the main cocos2dx directory.

So In my example:

c:\dev\cocos2d\cocos2dx-3.14.1 is where I ran the “cocos gen-libs” command.
c:\dev\ThinkDog\proj.android-studio is my main project directory.

I hope this helps someone.