[SDKBox] Facebook integration crash when app start

[SDKBox] Facebook integration crash when app start
0

I followed this link to integrate SDKBox Facebook plugin: (My Envionment : Eclipse, Android, Cocos2d-js v3.16)
http://docs.sdkbox.com/en/plugins/facebook/v3-js/
The installation was successfully but app crashed at initialization.
04-03 16:30:12.585 1573 2684 I am_crash: it said
No implementation found for void com.sdkbox.plugin.SDKBox.nativeInit(java.lang.Object, java.lang.ClassLoader) (tried Java_com_sdkbox_plugin_SDKBox_nativeInit
Then, I tried to test with the facebook sample project on github
https://github.com/sdkbox/sdkbox-sample-facebook
The app start successfully without crash,
There is only one difference is that the cocos version on github source was cocos v-3.9.
I already searched for the error and tried with the suggestion on following link but the issue stills remains

Eclipse?

No one works anymore with ecplise on Android - you should use android-studio

plz check Cocos2dxActivity.java file.

Thanks All,
recompiling project fixed the issue. I does not mention in the installation guideline. :frowning:

Hello! I have same error to. I added import;com.sdkbox.plugin.SDKBox; and SDKBox.init(this);
Now I have another error:

org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details.
at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:52)
at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:37)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:98)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:51)

Used:
сocos-js 3.17.1
android studio 3.3.2
facebook-sdk 2.4.3.3

Android studio writes: can not resolve symbol SDKBox

Help me plz!

I upgrate to version facebook-sdk 2.4.3.5 and add in CMakeLists.txt:

if(ANDROID)
add_definitions(-DSDKBOX_ENABLED)
add_subdirectory(${RUNTIME_SRC_ROOT}/proj.android/app/jni/PluginFacebook/)
target_link_libraries(${APP_NAME} ext_PluginFacebook
)
endif()

add sdkbox lib

if(ANDROID)
add_definitions(-DSDKBOX_ENABLED)
add_subdirectory(${RUNTIME_SRC_ROOT}/proj.android/app/jni/sdkbox/)
target_link_libraries(${APP_NAME} ext_sdkbox
)
endif()

now I have the following error

In file included from …/…/…/…/…/…/Classes/AppDelegate.cpp:71:
…/…/…/…/…/…/Classes/PluginFacebookJS.hpp:4:10: fatal error: ‘cocos/scripting/js-bindings/jswrapper/SeApi.h’ file not found
#include “cocos/scripting/js-bindings/jswrapper/SeApi.h”

I solved the problem . But in version facebook-sdk 2.4.3.3 only.

added in CMakeList
if(ANDROID)
add_definitions(-DSDKBOX_ENABLED)
add_subdirectory(${RUNTIME_SRC_ROOT}/proj.android/app/jni/PluginFacebook/)
target_link_libraries(${APP_NAME} ext_PluginFacebook
)
endif()

if(ANDROID)
add_definitions(-DSDKBOX_ENABLED)
add_subdirectory(${RUNTIME_SRC_ROOT}/proj.android/app/jni/sdkbox/)
target_link_libraries(${APP_NAME} ext_sdkbox
)
endif()

AND replace

record sources, headers

set(GAME_SOURCE ${RUNTIME_SRC_ROOT}/Classes/AppDelegate.cpp)
set(GAME_HEADER ${RUNTIME_SRC_ROOT}/Classes/AppDelegate.h)

with

set(GAME_SOURCE
${RUNTIME_SRC_ROOT}/Classes/AppDelegate.cpp
${RUNTIME_SRC_ROOT}/Classes/PluginFacebookJS.cpp
${RUNTIME_SRC_ROOT}/Classes/PluginFacebookJSHelper.cpp
${RUNTIME_SRC_ROOT}/Classes/SDKBoxJSHelper.cpp
)
set(GAME_HEADER
${RUNTIME_SRC_ROOT}/Classes/AppDelegate.h
${RUNTIME_SRC_ROOT}/Classes/PluginFacebookJS.hpp
${RUNTIME_SRC_ROOT}/Classes/PluginFacebookJSHelper.h
${RUNTIME_SRC_ROOT}/Classes/SDKBoxJSHelper.h
)

it seems it use jsb2 binding files, let me check it.

plz use files in ~/.sdkbox/plugins/sdkbox-facebook_v2.4.3.5/plugin/jsbindings/ folder, not
~/.sdkbox/plugins/sdkbox-facebook_v2.4.3.5/plugin/jsbindings/jsb2 .

and how do you upgrade plugin?


> Task :js317:assembleDebug
Skipping task ':js317:assembleDebug' as it has no actions.

:js317:assembleDebug (Thread[Task worker for ':',5,main]) completed. Took 0.0 secs.

BUILD SUCCESSFUL in 8m 52s
55 actionable tasks: 11 executed, 44 up-to-date
VCS Checkout Cache (/Users/admin/test/js317/frameworks/runtime-src/proj.android/.gradle/vcsWorkingDirs) has not been cleaned up in 0 days
Move apk to /Users/admin/test/js317/simulator/android
Build succeed.
~/test/js317 [master] $ sdkbox info
  _______ ______  _     _ ______   _____  _     _
  |______ |     \ |____/  |_____] |     |  \___/
  ______| |_____/ |    \_ |_____] |_____| _/   \_
 Copyright (c) 2016-2018 SDKBOX Inc. v1.0.2.8
 installed packages:
     v2.4.3.5 facebook

Same error. Did you fix this error?

In file included from …/…/…/…/…/…/Classes/AppDelegate.cpp:71:
…/…/…/…/…/…/Classes/PluginFacebookJS.hpp:4:10: fatal error: ‘cocos/scripting/js-bindings/jswrapper/SeApi.h’ file not found
#include “cocos/scripting/js-bindings/jswrapper/SeApi.h”

I used SDK Box to Import plugin and have error like above error. How to fix it? Thanks.

  • Cocos2d-x-3.16 (cocos2d-js project)
  • Android studio 3.1.1

org.gradle.internal.UncheckedException: Build command failed.
Error while executing process /Users/jonh_daniel/Development/android-ndk-r16b/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/Android.mk NDK_APPLICATION_MK=/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=1 APP_PLATFORM=android-23 NDK_OUT=/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/build/intermediates/ndkBuild/debug/lib NDK_TOOLCHAIN_VERSION=clang -j4 NDK_DEBUG=1 /Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/build/intermediates/ndkBuild/debug/obj/local/x86/libcocos2djs.so}
[x86] Compile++ : cocos2djs_shared <= PluginFacebookJS.cpp
[x86] Compile++ : cocos2djs_shared <= AppDelegate.cpp
[x86] Compile++ : cocos2djs_shared <= PluginFacebookJSHelper.cpp
[x86] Compile++ : cocos2djs_shared <= SDKBoxJSHelper.cpp
In file included from /Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/…/…/…/Classes/AppDelegate.cpp:24In file included from /Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/…/…/…/Classes/PluginFacebookJS.cpp:
:/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/…/…/…/Classes/PluginFacebookJS.hpp:14:
:10:/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/…/…/…/Classes/PluginFacebookJS.hpp :fatal error: 4’cocos/scripting/js-bindings/jswrapper/SeApi.h’ file not found:
10: fatal error: ‘cocos/scripting/js-bindings/jswrapper/SeApi.h’ file not found
#include “cocos/scripting/js-bindings/jswrapper/SeApi.h”#include “cocos/scripting/js-bindings/jswrapper/SeApi.h”
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from /Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/…/…/…/Classes/PluginFacebookJSHelper.cpp:2:
/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/…/…/…/Classes/PluginFacebookJSHelper.h:3:10: fatal error: ‘cocos/scripting/js-bindings/jswrapper/SeApi.h’ file not found
#include “cocos/scripting/js-bindings/jswrapper/SeApi.h”
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/cocos2djs_shared///__/Classes/PluginFacebookJS.o] Error 1
make: *** Waiting for unfinished jobs…
In file included from /Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/…/…/…/Classes/SDKBoxJSHelper.cpp:2:
/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/…/…/…/Classes/SDKBoxJSHelper.h:8:10: fatal error: ‘cocos/scripting/js-bindings/jswrapper/SeApi.h’ file not found
#include “cocos/scripting/js-bindings/jswrapper/SeApi.h”
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/cocos2djs_shared////Classes/PluginFacebookJSHelper.o] Error 1
1 error generated.
make: *** [/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/cocos2djs_shared/
///Classes/SDKBoxJSHelper.o] Error 1
1 error generated.
make: *** [/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/cocos2djs_shared///__/Classes/AppDelegate.o] Error 1

at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:63)
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:40)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:76)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.doExecute(DefaultTaskClassInfoStore.java:141)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:731)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:705)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:745)
Caused by: Build command failed.
Error while executing process /Users/jonh_daniel/Development/android-ndk-r16b/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/Android.mk NDK_APPLICATION_MK=/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=1 APP_PLATFORM=android-23 NDK_OUT=/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/build/intermediates/ndkBuild/debug/lib NDK_TOOLCHAIN_VERSION=clang -j4 NDK_DEBUG=1 /Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/build/intermediates/ndkBuild/debug/obj/local/x86/libcocos2djs.so}
[x86] Compile++ : cocos2djs_shared <= PluginFacebookJS.cpp
[x86] Compile++ : cocos2djs_shared <= AppDelegate.cpp
[x86] Compile++ : cocos2djs_shared <= PluginFacebookJSHelper.cpp
[x86] Compile++ : cocos2djs_shared <= SDKBoxJSHelper.cpp
In file included from /Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/…/…/…/Classes/AppDelegate.cpp:24In file included from /Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/…/…/…/Classes/PluginFacebookJS.cpp:
:/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/…/…/…/Classes/PluginFacebookJS.hpp:14:
:10:/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/…/…/…/Classes/PluginFacebookJS.hpp :fatal error: 4’cocos/scripting/js-bindings/jswrapper/SeApi.h’ file not found:
10: fatal error: ‘cocos/scripting/js-bindings/jswrapper/SeApi.h’ file not found
#include “cocos/scripting/js-bindings/jswrapper/SeApi.h”#include “cocos/scripting/js-bindings/jswrapper/SeApi.h”
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from /Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/…/…/…/Classes/PluginFacebookJSHelper.cpp:2:
/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/…/…/…/Classes/PluginFacebookJSHelper.h:3:10: fatal error: ‘cocos/scripting/js-bindings/jswrapper/SeApi.h’ file not found
#include “cocos/scripting/js-bindings/jswrapper/SeApi.h”
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/cocos2djs_shared///__/Classes/PluginFacebookJS.o] Error 1
make: *** Waiting for unfinished jobs…
In file included from /Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/…/…/…/Classes/SDKBoxJSHelper.cpp:2:
/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/jni/…/…/…/Classes/SDKBoxJSHelper.h:8:10: fatal error: ‘cocos/scripting/js-bindings/jswrapper/SeApi.h’ file not found
#include “cocos/scripting/js-bindings/jswrapper/SeApi.h”
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/cocos2djs_shared////Classes/PluginFacebookJSHelper.o] Error 1
1 error generated.
make: *** [/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/cocos2djs_shared/
///Classes/SDKBoxJSHelper.o] Error 1
1 error generated.
make: *** [/Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/proj.android/app/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/cocos2djs_shared///__/Classes/AppDelegate.o] Error 1

at com.android.build.gradle.tasks.ExternalNativeBuildTaskUtils.executeBuildProcessAndLogError(ExternalNativeBuildTaskUtils.java:302)
at com.android.build.gradle.tasks.ExternalNativeBuildTask.executeProcessBatch(ExternalNativeBuildTask.java:292)
at com.android.build.gradle.tasks.ExternalNativeBuildTask.build(ExternalNativeBuildTask.java:184)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
… 42 more

How do you import the facebook plugin?

plz try to fix with bellow command

cp -v ~/.sdkbox/plugins/sdkbox-facebook_v2.5.0.5/plugin/jsbindings/*.{h,hpp,cpp} /Users/jonh_daniel/workspace/MotalCombatClient/frameworks/runtime-src/Classes/
1 Like

Thank @yinjimmy. Yep, I did but the issue is still there. And I have a confusion, why I don’t see jswrapper folder in js-bindings folder. I created the project by command like this cocos new MyGame -l js .
Please correct me if I miss any step, thank you.

the binding codes are int frameworks/runtime-src/Classes/ folder, not js-bindings.

I see, I did with your suggest but still issue, and I see fatal error: ‘cocos/scripting/js-bindings/jswrapper/SeApi.h’ file not found so I look around js-bindings folder have not jswrapper folder, and think this is my problem, sorry to make you misunderstand this is another question. Thanks


Not found jswrapper folder.

I believe your app is not cocos2d-js 3.16,

~/test/js316 [master] $ ls frameworks/cocos2d-x/cocos/scripting/js-bindings/
CMakeLists.txt auto           proj.android   proj.win32
README.md      manual         proj.ios_mac   script

plz check with:

~/test/js316 [master] $ cat .cocos-project.json
{
    "engine_version": "cocos2d-x-3.16",
    "has_native": true,
    "project_type": "js"
}

and

~/test/js316 [master] $ cat frameworks/cocos2d-x/cocos/cocos2d.cpp

CC_DLL const char* cocos2dVersion()
{
    return "cocos2d-x-3.16";
}

NS_CC_END

1 Like

Right @yinjimmy, I have just upgraded to cocos2d-js 3.17 two days ago, but not right the way. That is the reason my issue not resolve, now it works. Your suggest command is solution for my issue. Thank @yinjimmy.