I have a problem that when I use admob an error occurs at manifest editor that says the file google-services.json is not parsed
idk what is the reason of this error
the app and the file both have the same package
#Region Project Attributes
#ApplicationLabel: Admob Testing 2020
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage:True
#End Region
#Region Activity Attributes
#FullScreen: True
#IncludeTitle:False
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
Private BannerAd As AdView
Private IAd As InterstitialAd
End Sub
Sub ads(banner As String,inter As String)
Dim MobileAds As MobileAds
MobileAds.Initialize
BannerAd.Initialize2("BannerAd", banner, BannerAd.SIZE_SMART_BANNER)
Dim height As Int
If GetDeviceLayoutValues.ApproximateScreenSize < 6 Then
If 100%x > 100%y Then height = 32dip Else height = 50dip
Else
height = 90dip
End If
Activity.AddView(BannerAd, 0dip, 100%y - height, 100%x, height)
BannerAd.LoadAd
IAd.Initialize("iad",inter)
IAd.LoadAd
End Sub
Sub Activity_Create(FirstTime As Boolean)
ads("ca-app-pub-3940256099942544/6300978111","ca-app-pub-3940256099942544/1033173712")
End Sub
Sub Activity_Resume
End Sub
Sub IAD_AdClosed
IAd.LoadAd
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Activity_Click
If IAd.Ready Then
IAd.Show
End If
End Sub
Have you put the google-services.json file in the projects folder? Open it with a text editor and check its content. Try to download a new one from Firebase.
Looks strange to me.
1. Use a packagename with at least TWO dots. com.example.something
2. After a underscore the following char should not be a number.
3. Better do not use underscore in Packagenames at all
Not much point in looking IN the " google-services.json " file for an error as the compile doesn't get that far. It fails to parse the file because that file is NOT FOUND in the folder specified in the error message. Where is the google-services.json file stored?
It works! ?
Thanks for everyone for the help!
Really this is the best forum you all are very kind and very helpful
Now I can finally put ads in my apps
Thanks so much