I tried to compile a project with integrated Youtube player from SDKBox for Android (Android Studio, android-26). The project is builded with Cocos Creator 1.8.1. The error
'Jsapi.h not found' occurred. I solved this problem by next actions:
- added a line to
- Then error occures about ambiguous of
RefPtrclass. There’s such class from Mozilla (spidermonkey) which conflcts with
RefPtrfrom Cocos2d-x. I had to refactor class RefPtr(Cocos) to
CCRefPtrsince files no exist refering to that class.
-fpermissivecompile key is appended in
PluginYoutubeJSHelper.his modified by changing function prototype
void register_all_PluginYoutubeJS_helper(JSContext* cx, JS::HandleObject global);
bool register_all_PluginYoutubeJS_helper(se::Object* obj);
#include "cocos/scripting/js-bindings/jswrapper/SeApi.h"at the top of the file.
Certainly these are not the best actions to fix the error. Please, write what I could to do to workaround this problem more correct.