问题
E/FBAudienceNetwork: You are using custom Application class and don't call AudienceNetworkAds.isInAdsProcess(). Multi-process support will be disabled. Please call AudienceNetworkAds.isInAdsProcess() if you want to support multi-process mode.
implementation 'com.facebook.android:audience-network-sdk:5.1.0'
implementation 'com.mopub.mediation:facebookaudiencenetwork:5.1.0.2'
am using FAN along with Mopub.
How to fix the above issue? Thanks in advance.
回答1:
It's likely because you use custom Application subclass. Put AudienceNetworkAds.isInAdsProcess() call on top of your custom Application class like this:
public class YourApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
if (AudienceNetworkAds.isInAdsProcess(this)) {
return;
}
// your normal onCreate() code
}
}
Now warning should disappear.
Alternatively you can turn multiprocess support off (not recommended) by setting:
AdSettings.setMultiprocessSupportMode(MultiprocessSupportMode.MULTIPROCESS_SUPPORT_MODE_OFF);
Note. You should call this before calling SDK methods or MoPub mediation.
来源:https://stackoverflow.com/questions/54685140/facebook-audience-network-ads-integration-issue