Airpush广告在测试时抛出异常

时间:2018-11-29 23:19:37

标签: android airpush

在发布之前,我还在Google上搜索了此错误,但未发现任何错误。 Airpush SDK X在模拟器(api 16)上运行良好,但是在Google Pixel 2 API 28上运行时出现异常

com.airpush.injector.internal.common.exceptions.NoAdException: No fill

   AirPush.init(this, "your_api_key", "your_app_id");
    AirPush.enableTestMode();
    View.OnClickListener onClickListener = new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            switch (view.getId()) {
                case R.id.bannerAd:
                    ((AirPushBannerView) findViewById(R.id.container)).show();
                    break;


                case R.id.banner360Ad:
                    AirPush360Banner airPush360Banner = new AirPush360Banner(MainActivity.this, 0);
                    airPush360Banner.setEventsListener(new IAirPushAdListener() {
                        @Override
                        public void onLoad(IAirPushPreparedAd ad) {
                            ad.show();
                        }

                        @Override
                        public void onError(Exception e) {
                            e.printStackTrace();
                        }
                    });
                    airPush360Banner.load();
                    break;


                case R.id.smartWallAd:
                    AirPushSmartWall airPushSmartWall = new AirPushSmartWall(MainActivity.this);
                    airPushSmartWall.setEventsListener(new IAirPushAdListener() {
                        @Override
                        public void onLoad(IAirPushPreparedAd ad) {
                            ad.show();
                        }

                        @Override
                        public void onError(Exception e) {
                            e.printStackTrace();
                        }
                    });
                    airPushSmartWall.load();
                    break;

0 个答案:

没有答案