Admob android with Cocos2Dx-2.2.3

Admob android with Cocos2Dx-2.2.3
0.0 0


I want to add a banner from Admob on my android game, I am using the Cocos2Dx-2.2.3 framework. I do not have any layout in my android project.

I have the following code in my

 protected void onCreate(Bundle savedInstanceState){

public Cocos2dxGLSurfaceView onCreateView() {

    Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this);
    glSurfaceView.setEGLConfigChooser(5, 6, 5, 0, 16, 8);

    return glSurfaceView;

How can I add the banner over the glSurfaceView ?

I have already add “GoogleAdMobAdsSdk-6.4.1.jar” in my project and the permissions :

in the AndroidManifest.xml.

But after that I don’t know how add the banner. I’ve tried different way that I found on the web but nothing work for me…

Thanks for your help.


Don’t use AdMob 6.4.1 It is soon to be deprecated. Use the ad framework in Google Play Services…