StartApp崩溃

时间:2018-07-31 15:21:36

标签: android runtime-error startapp

一个月前,我一直在使用startapp。我发生了崩溃,我无法找出解决方法。

崩溃链接

  1. http://crashes.to/s/46b427ce466
  2. http://crashes.to/s/57f01962d1c
  3. http://crashes.to/s/1d56db5aef6
  4. http://crashes.to/s/934c3e5d8e4
  5. http://crashes.to/s/c1e1fee4503

我的代码实现

对于奖励视频

        rewardedVideo = new StartAppAd(context);
        rewardedVideo.loadAd(StartAppAd.AdMode.REWARDED_VIDEO, new AdEventListener() {

            @Override
            public void onReceiveAd(Ad arg0) {
            }

            @Override
            public void onFailedToReceiveAd(Ad arg0) {
            }
        });
        rewardedVideo.showAd(new AdDisplayListener() {
            @Override
            public void adHidden(Ad ad) {
            }
            @Override
            public void adDisplayed(Ad ad) {
            }
            @Override
            public void adClicked(Ad ad) {
            }
            @Override
            public void adNotDisplayed(Ad ad) {
            }
        });
        rewardedVideo.setVideoListener(new VideoListener() {

            @Override
            public void onVideoCompleted() {
            }
        });

对于非页内广告

        final StartAppAd startAppAdOne = new StartAppAd(context);
        startAppAdOne.loadAd(StartAppAd.AdMode.AUTOMATIC, new AdEventListener() {

            @Override
            public void onReceiveAd(Ad arg0) {
                startAppAdOne.showAd();
            }

            @Override
            public void onFailedToReceiveAd(Ad arg0) {
                Log.e("MainActivity", "Failed to load add: " + arg0.getErrorMessage());
            }
        });

0 个答案:

没有答案