Sdkbox import plugin failed

Hi there,

I have been trying to get sdkbox to work but i cant import a plugin (in this case i tried admob) . i get this when i am trying to import it using the sdkbox gui in cocos creator.

What have i done wrong?

“Het systeem kan het opgegeven pad niet vinden” = “The system cant find the referenced path”

and does that path exist?

yes ,

image

Are you running Cocos Creator as “Administrator”? Can you right click on Cocos Creator and try again running as Administrator?

Also tried it and just did it again doesnt change anything

@yinjimmy can you help with this, please.

Could u plz enter build/jsb-default/ folder and run command:

sdkbox import admob -vv

I did it and it seems to import admob fine. But it just gives a black screen on the scene where i call the this.admobInit() function. and when i try opening the sdk plugin in cocos after it it gives this error

Can you try the following

  1. Open a command line
  2. cd to your project folder and then cd to build/jsb-default
  3. run the command sdkbox import admob -vv

I am also suffering with this issue.
at jsb-binary following error occurred.

 #FATAL: path is on drive C:, start on drive D:
 Installation failed :(

When run it at jsb-default, it will be compiled successfully but when run it on the android device, black screen show with following error

E/jswrapper: ERROR: Uncaught ReferenceError: sdkbox is not defined, location: src/project.dev.js:0:0
STACK:
[0]onLoad@src/project.dev.js:43788
[1]anonymous@(no filename):3
[2]invoke@src/jsb_polyfill.js:7943
[3]activateNode@src/jsb_polyfill.js:16965
[4]_activate@src/jsb_polyfill.js:6597
[5]runSceneImmediate@src/jsb_polyfill.js:31141
[6]anonymous@src/jsb_polyfill.js:31235
[7]anonymous@src/jsb_polyfill.js:19262
[8]anonymous@src/jsb_polyfill.js:15251
[9]anonymous@src/jsb_polyfill.js:22659
[10]onceWrapper@src/jsb_polyfill.js:14398
[11]84.EventListeners.invoke@src/jsb_polyfill.js:14243
[12]85.proto.emit@src/jsb_polyfill.js:14422
[13]callback@src/jsb_polyfill.js:31275

Please provide the solution for this issue.

plz ref to Problem with latest SDK box .

1 Like

Thank you for your reply.
I fixed it with your solution.

hi so i am kinda new to this appdelegat.cpp file and was wondering where to add the

cause werever i add it my compilation fails

nevermind i found it and admob works now :smiley: finally thanks for all the help

Thank you for your help.
Btw, I have found another issue,

W/System.err: java.lang.ClassNotFoundException: com.anysdk.framework.PluginWrapper
W/System.err:     at java.lang.Class.classForName(Native Method)
W/System.err:     at java.lang.Class.forName(Class.java:324)
W/System.err:     at java.lang.Class.forName(Class.java:285)
W/System.err:     at org.cocos2dx.javascript.SDKWrapper.getInstance(SDKWrapper.java:20)
W/System.err:     at org.cocos2dx.javascript.AppActivity.onCreateView(AppActivity.java:60)
W/System.err:     at org.cocos2dx.lib.Cocos2dxActivity.init(Cocos2dxActivity.java:437)
W/System.err:     at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:290)
W/System.err:     at org.cocos2dx.javascript.AppActivity.onCreate(AppActivity.java:40)
W/System.err:     at android.app.Activity.performCreate(Activity.java:6876)
W/System.err:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)
W/System.err:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206)
W/System.err:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
W/System.err:     at android.app.ActivityThread.access$1100(ActivityThread.java:221)
W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err:     at android.os.Looper.loop(Looper.java:158)
W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:7224)
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.anysdk.framework.PluginWrapper" on path: DexPathList[[zip file "/data/app/org.cocos2d.helloworld-2/base.apk", zip file "/data/app/org.cocos2d.helloworld-2/split_lib_dependencies_apk.apk", zip file "/data/app/org.cocos2d.helloworld-2/split_lib_slice_0_apk.apk", zip file "/data/app/org.cocos2d.helloworld-2/split_lib_slice_1_apk.apk", zip file "/data/app/org.cocos2d.helloworld-2/split_lib_slice_2_apk.apk", zip file "/data/app/org.cocos2d.helloworld-2/split_lib_slice_3_apk.apk", zip file "/data/app/org.cocos2d.helloworld-2/split_lib_slice_4_apk.apk", zip file "/data/app/org.cocos2d.helloworld-2/split_lib_slice_5_apk.apk", zip file "/data/app/org.cocos2d.helloworld-2/split_lib_slice_6_apk.apk", zip file "/data/app/org.cocos2d.helloworld-2/split_lib_slice_7_apk.apk", zip file "/data/app/org.cocos2d.helloworld-2/split_lib_slice_8_apk.apk", zip file "/data/app/org.cocos2d.helloworld-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/org.cocos2d.helloworld-2/lib/arm, /data/app/org.cocos2d.helloworld-2/base.apk!/lib/armeabi-v7a, /data/app/org.cocos2d.helloworld-2/split_lib_dependencies_apk.apk!/lib/armeabi-v7a, /data/app/org.cocos2d.helloworld-2/split_lib_slice_0_apk.apk!/lib/armeabi-v7a, /data/app/org.cocos2d.helloworld-2/split_lib_slice_1_apk.apk!/lib/armeabi-v7a, /data/app/org.cocos2d.helloworld-2/split_lib_slice_2_apk.apk!/lib/armeabi-v7a, /data/app/org.cocos2d.helloworld-2/split_lib_slice_3_apk.apk!/lib/armeabi-v7a, /data/app/org.cocos2d.helloworld-2/split_lib_slice_4_apk.apk!/lib/armeabi-v7a, /data/app/org.cocos2d.helloworld-2/split_lib_slice_5_apk.apk!/lib/armeabi-v7a, /data/app/org.cocos2d.helloworld-2/split_lib_slice_6_apk.apk!/lib/armeabi-v7a, /data/app/org.cocos2d.helloworld-2/split_lib_slice_7_apk.apk!/lib/armeabi-v7a, /data/app/org.cocos2d.helloworld-2/split_lib_slice_8_apk.apk!/lib/armeabi-v7a, /data/app/org.cocos2d.helloworld-2/split_lib_slice_9_apk.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
W/System.err:     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
W/System.err: 	... 20 more
W/System.err: 	Suppressed: java.lang.ClassNotFoundException: com.anysdk.framework.PluginWrapper
W/System.err:     at java.lang.Class.classForName(Native Method)
W/System.err:     at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
W/System.err:     at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
W/System.err: 		... 21 more
W/System.err: 	Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

Can I fix this error too?

Its AnySDK. It’s fine if you app donot crash:]

Search the forum, there should be some tutorial about how to remove anysdk if it causes problem.

Yes, remove AnySDK if you are not using it. Ping me if you run into trouble and I can help.