Admob problem

main.lua

local ads = require "ads" -- Your application ID appID = "ca-app-pub-nnnnnnnnnnn/nnnnnnnn" provider = "admob" -- Load Corona 'ads' library local showAd -- Set up ad listener. function adListener( event ) msg = event.response -- just a quick debug message to check what response we got from the library --print("Message received from the ads library: ", msg) if event.isError then -- print( "Error, no ad received", msg ) else -- print( "Ah ha! Got one!" ) end end ads.init( provider, appID, adListener ) showAd = function( adType ) local adX, adY = display.screenOriginX, display.screenOriginY ads.show( adType, { x=adX, y=adY } ) ads.show( adType, {appID=appID} ) end ads.show( "interstitial", { appId=appID } ) 

build.setting

-- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight settings = { orientation = { default = "portrait", supported = { "portrait", } }, iphone = { plist = { UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay --UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend --[[-- iOS app URL schemes: CFBundleURLTypes = { { CFBundleURLSchemes = { "fbXXXXXXXXXXXXXX", -- example scheme for facebook "coronasdkapp", -- example second scheme } } } --]] } }, --[[-- Android permissions androidPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", },]]-- android = { googlePlayGamesAppId = "29844238489347" , }, plugins = { --key is the name passed to the Lua "require()" ["CoronaProvider.gameNetwork.google"] = { --required! publisherId = "com.coronalabs", supportedPlatforms = { android=true }, }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs" }, }, }

Why my app will close automatically when I show ads . 

Are you looking in your device’s console log for any errors?

My app works fine when I remove the google play game services plugins . What is the problem ?

 
 

Are you looking in your device’s console log for any errors?

My app works fine when I remove the google play game services plugins . What is the problem ?