hey Guys,
I am using the admob plugin for the first time and therefore I need help from programmer who are more experienced than me.
This is my error code :
Copyright © 2009-2021 C o r o n a L a b s I n c .
Version: 3.0.0
Build: 2021.3648
Aug 25 21:51:29.907 WARNING: issue found in /Users/lorenzmartin/Desktop/Games/Game Engine Projects/Fruit Shooter/Fruit Shooter/build.settings:
Aug 25 21:51:29.908 WARNING: unrecognized key: settings.1.versionCode (string)
Aug 25 21:51:29.908 Copyright © 2009-2021 C o r o n a L a b s I n c .
Version: 3.0.0
Build: 2021.3648
Aug 25 21:51:29.930 Loading project from: ~/Desktop/Games/Game Engine Projects/Fruit Shooter/Fruit Shooter
Aug 25 21:51:29.930 Project sandbox folder: ~/Library/Application Support/Corona Simulator/Fruit Shooter-C32A65C7B2DD2D0325298268B354EFD0
Aug 25 21:51:29.980 Platform: iPhone / x86_64 / 11.2.3 / Intel® UHD Graphics 617 / 2.1 INTEL-16.1.12 / 2021.3648 / de-DE | DE | en_DE | en
Aug 25 21:51:38.474 admob.init() WARNING: The AdMob plugin is only supported on Android & iOS devices. Please build for device
Aug 25 21:51:38.475
Aug 25 21:51:38.484 admob.isLoaded() WARNING: The AdMob plugin is only supported on Android & iOS devices. Please build for device
Aug 25 21:51:38.484
This is my build.settings code:
settings =
{
orientation =
{
default =“portrait”,
supported = {“portrait”},
},
plugins =
{
[“plugin.admob”] =
{
publisherId = “com.coronalabs”,
},
},
android =
{
applicationChildElements =
{
[[
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="********************"/>
]],
},
},
{
versionCode = "11",
},
{
midSdkVersion = "16",
},
}
This is my main.lua code:
local admob = require( “plugin.admob” )
local appID = “***********************”
local interstitialUnitID = “****************************”
– AdMob listener function
local function adListener( event )
if ( event.phase == "init" ) then -- Successful initialization
-- Load an AdMob interstitial ad
admob.load( "interstitial", { adUnitId="****************************" } )
end
end
– Initialize the AdMob plugin
admob.init( adListener, { appId="********************" } )
– Sometime later, show the interstitial ad
if ( admob.isLoaded( “interstitial” ) ) then
admob.show( “interstitial” )
end
Thank you for every help!!