AdMob 在 Phonegap 3 的 0x00000008 (code=1) 处抛出致命信号 11 (SIGSEGV)
我在日志中收到此错误并且应用程序崩溃:
I am getting this error in logs and the app crashes:
15:53:22.518: A/libc(25934): Fatal signal 11 (SIGSEGV) at 0x00000008 (code=1), thread 25934 (s.testapp)
在时触发的错误:
- 我在 admob 横幅上按下/点击/滑动.
- 将手机从横向变为纵向,反之亦然.
- 在应用上点击/按下/滑动手指(横幅外).
我在 Android 4.1.2 上使用 SDK GoogleAdMobAdsSdk-6.4.1 和 Phonegap 3.0,我知道是 admob,因为当我禁用它时,问题就消失了.
I am using SDK GoogleAdMobAdsSdk-6.4.1 with Phonegap 3.0 on Android 4.1.2, I know is admob because when I disable it, the problem is gone.
代码如下:
adView = new AdView(this, AdSize.BANNER, "xxxxxx");
LinearLayout layout = super.root;
layout.addView(adView);
layout.setHorizontalGravity(android.view.Gravity.CENTER_HORIZONTAL);
AdRequest request = new AdRequest();
//request.addTestDevice(AdRequest.TEST_EMULATOR);
adView.loadAd(request);
推荐答案
我注意到我的应用程序也崩溃了,但仅限于动画广告.
I have noticed that my app crashed too but only for animated ads.
然后,我将应用标签中清单文件中的 android:hardwareAccelerated
改为 false
.我的应用现在运行良好.
Then, I turned the android:hardwareAccelerated
to false
in the manifest file in the application tag. My app is working fine now.
相关文章