Admob integration with cocos2d-x 2.0.3 in android plataform


I use the HelloCpp example and try to show an admob ad inside it.

I use the following code in my onCreate method inside HelloCpp class:

                runOnUiThread(new Runnable() {

            public void run() {

                LinearLayout.LayoutParams adParams = new LinearLayout.LayoutParams(

                adView = new AdView(HelloCpp.this, AdSize.BANNER, "a150b62207a5a96");

                // adView.loadAd(new AdRequest());
                AdRequest request = new AdRequest();
                addContentView(adView, adParams);

The ad shows correctly, but when I click on it , i receive the following error

Fatal signal 11 (SIGSEGV) at 0x00000124 (code=1)

Any idea what is wrong with that?


My admob code work perfectly.

The problem is that I create a method to pause my game, is that method that make my game crash, not admob code.