I am using cocos2d-js 3.1 that must be the issue. I can’t downgrade my project now. so I wll keep trying to compile on 3.1 , I’m pretty sure the problem is in the android.mk files.
Thanks for the help anyway!.
Thank you, works great in my project
Any idea how to display interstitial ads? I managed to do it on iOS, I believe it is possible to do something similar on android as well…
Cheers!
There is a proj.android folder , import that project in to eclipse edit it the way you want just dont change the flow , edit the same way you did for interestitial ads on iOS set it up for android
I have implemented it and almost done with the sample project also but lil busy from last two weeks to finish off my blog , I have updated maximum plugin which were required for my project , one small thing is left had got bug in googleIAP plugin which I will be fixing this weekend
sounds good.
I’m currently checking other platforms for html5/js game development… I had a breakdown while dealing with facebook/admob/IAP integration for cocos2d-js … seems like other platforms handing simpler methods to deal with this kind of stuff…
I think cocos2D-JS is a great platform for developing games’ cores. in terms of plugins, I think it’s not there yet.
It lacks basic features of retrieving facebook profile pictures for example.
Integrating plugins and using them is difficult since you have to work your way through obj-c, java & c++ to make it work. I feel like I need to invest a lot of time preparing & integrating the plugins I need for my game, as first time user.
Also, documentation is rather poor. There are a lot of outdated manuals and tutorials and one need to go through a lot of work doing it alone.
It took me around two weeks to integrate facebook, just to face problems loading profile pictures on mobile platforms.
IAP on iOS doesn’t work (thread), no interstitial support for admob.
what about other platforms? chartboost, leadbolt, mopub and others?
Finally, I’m not sure performance is that important when creating simple 2d games. cocos2d would probably beat it contenders in this section but I truly believe the html canvas is just good enough for casual gaming. Other platforms are straight and easy to work with plugins and that is currently way more important for me.
After maticulously following your steps and double checking everything I am getting the following error when I try to debug my HelloWorld project:
JS: /data/data/org.cocos2dx.PrebuiltRuntimeJs/files/debugruntime/src/app.js:11:ReferenceError: plugin is not defined
Where my line 11 code is: var AdMob = plugin.PluginManager.getInstance.loadPlugin(“AdsAdmob”)
Thankyou for putting the time into writing a walkthrough
Hello, @Marteh . Please check your code. You must have this (pay attention to getInstance() but in your example you have getInstance without brackets):
var AdMob = plugin.PluginManager.getInstance().loadPlugin("AdsAdmob");
I tried getInstance with and without brackets with the same result. It appears cocos doesn’t know what object “plugin” is. The error that keeps stopping me is “plugin is not defined”.
After checking where the problem may lie, I discovered it is in AppActivity.java when I call
"import org.cocos2dx.plugin.PluginWrapper;"
I get the error:
[javac] C:\Android\workspace\Cashmeir\frameworks\runtime-src\proj.android\src\org\cocos2dx\javascript\AppActivity.java:31: error: package org.cocos2dx.plugin does not exist
I don’t know the framework well enough to come up with my own solution of how to import org.cocos2dx.plugin, maybe I need to use Android.mk to call my publish folder manually? Or the protocol folder? Hope you can give me a different insight