I am using Eclipse and I try to show ads via the Facebook Audience Network. I have added the "AudienceNetwork.jar" from the official Facebook SDK, and the "FacebookAdapter.jar" from the AdMob Mediation Networks.
I should mention that I monetize via the AdMob and do not use proguard.
My problem is that when I try to load ads, I get the following error:
02-19 20:07:35.315: I/Ads(23957): Instantiating mediation adapter: com.google.ads.mediation.facebook.FacebookAdapter
02-19 20:07:35.316: I/dalvikvm(23957): Failed resolving Lcom/google/ads/mediation/facebook/FacebookAdapter; interface 1798 'Lcom/google/android/gms/ads/mediation/MediationInterstitialAdapter;'
02-19 20:07:35.316: W/dalvikvm(23957): Link of class 'Lcom/google/ads/mediation/facebook/FacebookAdapter;' failed
02-19 20:07:35.316: W/Ads(23957): Could not instantiate mediation adapter: com.google.ads.mediation.facebook.FacebookAdapter. com.google.ads.mediation.facebook.FacebookAdapter
According to this and this post, this should happen only if I used proguard, which I don't.
Does anyone has a suggestion on why this happens?
And why doesn't the Facebook itself have any documentation on how to integrate the Audience Network via AdMob, since the first is supported by the latter one? :-)
It doesn't look like com/google/ads/mediation/facebook/FacebookAdapter is contained within your APK. Check your APK, your build process, how you have added the FacebookAdapter library and the contents of the FacebookAdapter library itself.
I tried with a banner ad. Wanted to load ads from Facebook Audience Networrk through Admob mediation when I ended up with the same error.
Please make sure you added the Google Play Services Lib to your build path and check if your version of the Google Play Services Lib contains the MediationInterstitialAdapter.class and the MediationNativeAdapter.class. Mine did not (still working with eclipse) and so the FacebookAdapter was searching for a class that was not there.
After updating to a newer version (links here: How to download older google play services?) the mediation now works fine for me. :)
Related
I am trying to release a new version of my app.
The older version can still display ads, but my newer version (release build, not debug)
cannot show ads. I am getting the following error:
2020-03-03 01:54:42.351 7098-7098/? I/Ads: Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("457B729F085881806B918663EF07468C") to get test ads on this device.
2020-03-03 01:54:42.442 3275-7238/? W/Ads: App does not have the required permissions to get location
2020-03-03 01:54:42.517 3275-7485/? I/Ads: SDK version: afma-sdk-a-v20088999.19649000.1
2020-03-03 01:54:43.174 7098-7098/? I/Ads: Ad failed to load : 3
Any way to tell the Admob SDK that the current build is a release build?
one more step you can do,
as you see in your log this code Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("457B729F085881806B918663EF07468C") to get test ads on this device.
with your device id is: 457B729F085881806B918663EF07468C
now before intilization you can add the following:
RequestConfiguration configuration = new RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("457B729F085881806B918663EF07468C")).build();
MobileAds.setRequestConfiguration(configuration);
any body else reading this solution should change the device ID.
reference here
Short answer: just wait for some hours till people start downloading and using the app.
Actually the log messages don't mean that I had to run test ads. It seems admob was not just showing ads until some people downloaded my app and started using it.
Once I published the update, I had to wait for 6-7 hours after which ads started showing.
I'm trying to integrate fb native ads in android but its giving me error every time I try to fetch an ad.
When I log the error its showing error code as -1 and unknown message
I have followed full documentation from https://developers.facebook.com/docs/audience-network/android/nativeadsmanager while integrating but couldn't find any solution
Thanks
May be you are using the wrong dependency. Replace the following dependency (or whatever number you have before :+:
implementation 'com.facebook.android:audience-network-sdk:5.+'
with
implementation 'com.facebook.android:audience-network-sdk:5.0.1'
I am getting the following error,
Security alert Your app is using an unsafe implementation of
HostnameVerifier.
Please see this Google Help Center article for
details, including the deadline for fixing the vulnerability.
Vulnerable classes: com.paytm.pgsdk.i Affects APK version 10.
while uploading my app on google play. My app has paytm integrated with Paytm sdk.
Please help me with any solution or suggestion how to resolve this error.
Thanks.
I got a solution to remove the error "unsafe implementation of HostnameVerifier".
Simply use in https URLs in both the PaytmMerchant URLs
(inChecksumGenerationURL and inChecksumVerificationURL).
I'm implementing google authentication on firebase using the firebaseui lib.
Firebase is working properly, i can access the data in my database, and email/password auth is also working, although when i try to login using google i always get the same error :
W/AuthMethodPicker: Firebase sign in with credential unsuccessful
com.google.firebase.FirebaseException: An internal error has occured. [ Cannot find GOOGLE appId for project: 12345678. ]
at com.google.android.gms.internal.zzafg.zzes(Unknown Source)
at com.google.android.gms.internal.zzafd$zzg.zza(Unknown Source)
at com.google.android.gms.internal.zzafo.zzet(Unknown Source)
at com.google.android.gms.internal.zzafo$zza.onFailure(Unknown Source)
at com.google.android.gms.internal.zzafj$zza.onTransact(Unknown Source)
at android.os.Binder.execTransact(Binder.java:453)
i know that this value is extracted from the json file and added as a resource property during build by com.google.gms.google-services plugin, so i checked and the property was in fact added but for some reason it seems that firebase is not able to read it at runtime..
Any idea about what i can be doing wrong?
thanks!
Before you generated your app's google-services.json, did you enable Google Sign In for your project?
https://developers.google.com/identity/sign-in/android/start-integrating
Make sure you have a Firebase project
In that project make sure you have enabled GOOGLE AUTHENTICATION
Now Download a fresh copy of the google-services.json and replace it with the old one inside your app folder
yes i enabled google auth before generating the json.
Another detail is descovered in the meantime if that google auth does work without firebase-ui.
What i did was to try their example of google auth (adding to my app source) and it worked without issues.
Adding firebase-ui seems to remove the need for some extra logic so i wanted to use it, but it seems i'm either missing something or there is a bug on firebase-ui .
Leaving this here for anyone that might encounter this issue now.
Had a similar problem to above only difference is i had it on iOS. Would try to launch and sign in through google and would get the same internal error.
What worked for me was enabling the identity kit on google API and then checking "Google" and the other providers I used. You can find this on the google cloud console -> API Manager -> Dashboard.
App restart, clean build and then everything worked.
I have an issue with Firebase Analytics. It basically boils down to the fact that nothing is registered; I have no data in my analytics page in the console.
I noticed today that when I want to send a push notification and I set a filter for the version number of my app, it shows "No versions available for this app". However, my iOS version of the app IS showing a version number in the dropdown list.
Does anyone have an idea what the issue is?
Some other issues I'm still experiencing:
"Firebase API initialization failure." IncompatibleClassChangeError ContextCompat.getNoBackupFilesDir() -> InvocationTargetException
Failed to load module descriptor class: Didn't find class "com.google.android.gms.dynamite.descriptors.com.google.firebase.auth.ModuleDescriptor"
Many thanks in advance.
the failed to load is not the problem, i have it too when using firebase-invites and i found this (Failed to load module descriptor class: Didn't find class "com.google.android.gms.dynamite.descriptors.com.google.firebase.auth.ModuleDescriptor")
the "Firebase API initialization failure." IncompatibleClassChangeError ContextCompat.getNoBackupFilesDir() -> InvocationTargetException
was fixed by updating the google services in the device