一个月前,我一直在使用startapp。我发生了崩溃,我无法找出解决方法。
崩溃链接
我的代码实现
对于奖励视频
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());
}
});