Hi. I have problem with admob. I tried to make a banner ad.
-
I’m registered on AdMob and I have activated AdMob plugin.
-
Lua code for the banner ad
local admob = require( “plugin.admob” )
– AdMob listener function
local function adListener( event )
if ( event.phase == “init” ) then – Successful initialization
– Load an AdMob banner ad
admob.load( “banner”, { adUnitId=“ca-app-pub-xxx/xxx” } )
end
end– Initialize the AdMob plugin
admob.init( adListener, { appId=“ca-app-pub-xxx~xxx” } )– Sometime later, show the banner ad
if ( admob.isLoaded( “banner” ) ) then
admob.show( “banner”, { y=“top” } )
end
- I added to build.settings like here
https://docs.coronalabs.com/plugin/admob/index.html#project-settings
But the problem is:
["plugin.admob"] = { publisherId = "com.coronalabs" },
When it’s added, I have error during the building.
I tried on 3598 and 3582, result is the same.
What can I try now?