【发布时间】:2020-10-22 19:43:36
【问题描述】:
我正在尝试让 distriqt Adverts 扩展程序在我的 AIR 应用程序中工作。
在我尝试我的应用程序的每台设备上,我都知道Adverts.service.interstitials.isSupported 返回false。
在一台设备上,我也收到这些 Java 错误,这可能是原因:
Error #2044: Unhandled error:. text=Attempt to invoke virtual method 'java.lang.String com.adobe.fre.FREObject.getAsString()' on a null object reference
Error #2044: Unhandled error:. text=Attempt to invoke interface method 'boolean com.distriqt.extension.adverts.platforms.AdvertPlatform.isInterstitialsSupported()' on a null object reference
我检查并再次检查了所有必需的扩展都列在应用程序描述符 xml 的 <extensions> 部分中,并且它们实际上包含在 APK 中。
这里是 AS 代码的摘录:
if (Adverts.isSupported)
{
var r:int = GoogleApiAvailability.instance.isGooglePlayServicesAvailable();
if (r == ConnectionResult.SUCCESS)
{
Adverts.service.initialisePlatform(AdvertPlatform.PLATFORM_ADMOB, myAppId);
if (Adverts.service.interstitials.isSupported)
{
// etc...
}
else trace("Interstitials not supported");
我做错了什么,或者我可以做些什么来找出我做错了什么?
(由于声誉不足,无法在此问题中添加adverts 标签)
【问题讨论】: