Hello. I’m trying to add Admob to a game.
I have these settings in my build.settings
plugins = { -- key is the name passed to Lua's 'require()' ["CoronaProvider.ads.admob"] = { -- required publisherId = "com.coronalabs", }, },
and this in my main.lua
local ads = require "ads" ads.init( "admob","MyAdmobAppID", adListener ) ads.show( "banner", { x=0, y=0 } )
When I run the project and it asks to download the plugin, I get these erros:
Runtime error ?:0: attempt to index field 'platforms' (a nil value) stack traceback: [C]: ? ?: in function 'findOrDownloadPlugin' ?: in function \<?:399\> Runtime error: ?:0: attempt to index field 'platforms' (a nil value) stack traceback: [C]: ? ?: in function 'findOrDownloadPlugin' ?: in function \<?:399\>
I noticed that If I change publisherId = “com.coronalabs”, from build.settings to my Admob Appid, I don’t get the same error, but When trying to build to the Device, I get the following error:
Not currently subscribed to AppID:CoronaProvider… etc…
How to solve this?