我有个问题。我通过Admob调解实现了AdColony奖励广告。它自己起作用。然后,我还通过Admob中介实现了Vungle奖励广告。问题是,AdColony要求每个Activities在重写的(onPause,onResume)方法中都具有AdColony.Pause()和AdColony.Resume()。几乎每次我运行Vungle广告时,我都会收到以下信息的Force Close
我发现我的技术不那么复杂,因为我不知道如何应对。插播广告效果很好。问题只出在有回报的广告上。有人能建议怎么做吗?问题可能是新的,因为谷歌在2016年3月15日宣布了奖励广告调解。
03-31 20:38:42.869 19578-20093/? E/AndroidRuntime: FATAL EXCEPTION: Thread-107283
Process: org.ovh.EmpireSTG, PID: 19578
com.jirbo.adcolony.AdColonyException: AdColony.configure() must be called before any other AdColony methods. If you have called AdColony.configure(), the Activity reference you passed in via AdColony.configure()/AdColony.resume() is null OR you have not called AdColony.resume() as appropriate.
at com.jirbo.adcolony.a.b(SourceFile:181)
at com.jirbo.adcolony.a.e(SourceFile:222)
at com.jirbo.adcolony.AdColonyV4VCAd.<init>(SourceFile:40)
at com.jirbo.adcolony.AdColonyAdapter.a(SourceFile:427)
at com.jirbo.adcolony.AdColonyAdapter$9.run(SourceFile:485)
at java.lang.Thread.run(Thread.java:818)
在启动广告的活动中实现onResume和onPause对我来说确实有效:
@Override
protected void onResume()
{
super.onResume();
if (AdColony.isConfigured()) AdColony.resume( this );
}
@Override
protected void onPause()
{
super.onPause();
if (AdColony.isConfigured()) AdColony.pause();
}