首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >来自distriqt Adverts扩展的Java错误

来自distriqt Adverts扩展的Java错误
EN

Stack Overflow用户
提问于 2020-07-02 16:44:54
回答 1查看 70关注 0票数 1

我正在尝试让distriqt Adverts扩展在我的AIR应用程序中工作。在我尝试我的应用程序的每个设备上,我都会得到Adverts.service.interstitials.isSupported返回false。在一台设备上,我也得到了这些Java错误,这可能是原因:

代码语言:javascript
复制
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代码的摘录:

代码语言:javascript
复制
    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标记添加到此问题,因为没有足够的声誉)

EN

回答 1

Stack Overflow用户

发布于 2020-07-03 07:45:35

检查您的myAppId的值是什么。

第一个错误将指示它是null,并且initialisePlatform()调用失败。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62692433

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档