有没有大佬接过oppo广告联盟apk的sdk

有没有大佬接过oppo广告联盟apk的sdk。这么一堆报错。也找不到oppo的技术支持。


有没有大佬给个建议啊。或者给个oppo广告联盟的技术支持。。太坑了。这 :sob:

报错信息看的人很迷茫

意思大概是你引入了的jar或者aar里面有个重名的类 重复引入库了

clean一下可能有奇效

你在build.gradle中加入了

implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])

然后又单独写了这个sdk的引入

在吗在吗,你接好没,求帮助大佬

在。。刚好看到

哦哦。已解决。。谢谢大佬 :grin:

怎么写,你接过原生渲染banner没,大佬救命呀

public static void showBanner(){

    Log.e(BANNERTAG, "showBanner: " );

    _appActivity.runOnUiThread(new Runnable() {

        @Override

        public void run() {

// _appActivity.setContentView(R.layout.activity_banner);

// if(_appActivity.mFrameLayout == null){

                _appActivity.mFrameLayout = (FrameLayout) _appActivity.getWindow().getDecorView().findViewById(android.R.id.content);

// }

            _appActivity.mBannerAd = new BannerAd(_appActivity,"342363");

            _appActivity.mBannerAd.setAdListener(new IBannerAdListener() {

                @Override

                public void onAdReady() {

                    Log.e(BANNERTAG, "onAdReady: " );

                    if (null != _appActivity.bannerAdView) {

                        if(_appActivity.params == null){

                            _appActivity.params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,

                                    ViewGroup.LayoutParams.WRAP_CONTENT);

                        }

                        int needBannerHeight = (int) (_appActivity.mFrameLayout.getWidth() / 1080.0 * 170);

                        _appActivity.params.topMargin = _appActivity.mFrameLayout.getHeight() - needBannerHeight;

                        _appActivity.params.bottomMargin = 0;

                        _appActivity.bannerAdView.setLayoutParams(_appActivity.params);

                    }

                }

                @Override

                public void onAdClose() {

                    Log.e(BANNERTAG, "onAdClose: " );

                }

                @Override

                public void onAdShow() {

                    Log.e(BANNERTAG, "onAdShow: " );

                }

                @Override

                public void onAdFailed(String s) {

                    Log.e(BANNERTAG, "onAdFailed: " +s);

                }

                @Override

                public void onAdFailed(int i, String s) {

                    Log.e(BANNERTAG, "onAdFailed: " +s);

                }

                @Override

                public void onAdClick() {

                    Log.e(BANNERTAG, "onAdClick: " );

                }

            });

            if(_appActivity.bannerAdView == null) {

                _appActivity.bannerAdView = _appActivity.mBannerAd.getAdView();

            }

            if (null != _appActivity.bannerAdView) {

                _appActivity.mFrameLayout.addView(_appActivity.bannerAdView);

            }

            _appActivity.mBannerAd.loadAd();

        }

    });

}

public static void hideBanner(){

    Log.e(BANNERTAG, "hideBanner: " );

    _appActivity.mFrameLayout.removeView(_appActivity.bannerAdView);

    _appActivity.bannerAdView = null;

}

我接oppo是这样写的。其他平台的话得看下其他平台的文档

就是oppo,你这个是广告联盟原生渲染成的banner吗

它这个原生渲染的出现后无法点击其他地方,只有关闭广告后才能点击,现在原生banner我不需要这个限制,就卡再这里了。

是啊。你是不是他的背景layout设置成了全屏。。
他的广告都依赖在layout上的。
_appActivity.mFrameLayout = (FrameLayout) _appActivity.getWindow().getDecorView().findViewById(android.R.id.content);

应该是这句话吧。我也没有特别懂。我用的是案例代码。自己稍微修改了下。但是基本没什么改动。原生banner出来也不会影响点击。

好的,我试试,谢谢哈

该主题在最后一个回复创建后14天后自动关闭。不再允许新的回复。