Admob ads aren't working

Hey Guys,

I am using Admob for the first time and I don’t
know whether my code for banner ads and for interstitial ads is correct.
There is the problem that there aren’t any ads if I test my app on a device.

This is the build settings code:
settings =
{
orientation =
{
default =“portrait”,
supported = {“portrait”},
},

plugins =
{
[“plugin.admob”] =
{
publisherId = “com.coronalabs”,

      },
  },

android =

  {
       midSdkVersion = "16",
       applicationChildElements =
    {
        [[
            <meta-data  
                                            android:name="com.google.android.gms.ads.APPLICATION_ID"  

android:value=“ca-app-pub-3625432895557434~6682668397”/>
]],
},
},

      {
    versionCode = "16",
       },

}

This is my main.lua code:
local admob = require( “plugin.admob” )

– 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="*******************************" } )

if ( admob.isLoaded( “interstitial” ) ) then
admob.show( “interstitial” )
end

admob = require( “plugin.admob” )

– Declare variable for storing banner height; this may change if device is rotated
local bannerHeight

– AdMob listener function
function adListener( event )

if ( event.phase == "init" ) then  -- Successful initialization
    -- Load an AdMob banner ad
    admob.load( "banner", { adUnitId="*****************************************" } )
     
elseif ( event.phase == "loaded" ) then
    if ( event.type == "banner" ) then  -- Banner ad is loaded
        bannerHeight = admob.height()  -- Get the loaded banner's height
        -- Show the banner ad with a 30 pixel gap between the screen bottom
        admob.show( "banner", { y = display.actualContentHeight - bannerHeight - 30 } )
    end
end

end

– Initialize the AdMob plugin
admob.init( adListener, { appId="******************************" } )

Is there anybody who knows what an Application ID in the build settings is?

And what other thing do I need in my project folder?

Thank you for every help!!!

First, it is so hard to read your post because of the formatting. Please use three ``` or three spaces to format a paragraph.

The appId is not required in the init.

admob.init( adListener )

Then put that appid as the Application ID in the build settings.

If I delete the appId in the AdMob.init my game isn’t
working and also if I put it into the application Id

This is my error code:

WARNING: issue found in build.settings:

Sep 01 08:43:52.334 WARNING: unrecognized key: settings.1.versionCode (string)

Sep 01 08:43:52.334 WARNING: unrecognized key: settings.android.midSdkVersion (string)

Sep 01 08:43:52.334 Copyright © 2009-2021 C o r o n a L a b s I n c .
Version: 3.0.0
Build: 2021.3648

Sep 01 08:43:52.342 Loading project from: ~/Desktop/Games/Game Engine Projects/Fruit Shooter/Fruit Shooter

Sep 01 08:43:52.342 Project sandbox folder: ~/Library/Application Support/Corona Simulator/Fruit Shooter-C32A65C7B2DD2D0325298268B354EFD0

Sep 01 08:43:52.360 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

Sep 01 08:43:57.495 admob.init() WARNING: The AdMob plugin is only supported on Android & iOS devices. Please build for device

Sep 01 08:43:57.497 admob.isLoaded() WARNING: The AdMob plugin is only supported on Android & iOS devices. Please build for device

Sep 01 08:43:57.497

Sep 01 08:43:57.501 admob.init() WARNING: The AdMob plugin is only supported on Android & iOS devices. Please build for device

Sep 01 08:43:57.501

As the warning says: It doesn’t work on the simulator. You need to build and deploy it onto the device.

Yes I do play the game on a testing device but nevertheless this error message is coming.

Do you have another reason for this message.

Nope. That is the only reason that exists for that error. You are playing your game on a device that isn’t an iOS or Android device. The logs don’t look like device logs. The look like simulator logs.