我希望有人可以帮我翻译此错误消息的含义,以便我可以修复我的应用崩溃。几个小时的搜索谷歌等没有提供任何线索。
LogCat输出:
03-15 22:33:12.383: W/Adreno-GSL(31852): <gsl_ldd_control:393>: ioctl fd 55 code 0xc0140910 (IOCTL_KGSL_RINGBUFFER_ISSUEIBCMDS) failed: errno 71 Protocol error
03-15 22:33:12.383: W/Adreno-GSL(31852): <log_gpu_snapshot:308>: panel.gpuSnapshotPath is not set.not generating user snapshot
03-15 22:33:13.173: W/Adreno-GSL(31852): <gsl_ldd_control:393>: ioctl fd 55 code 0xc0140910 (IOCTL_KGSL_RINGBUFFER_ISSUEIBCMDS) failed: errno 35 Resource deadlock would occur
03-15 22:33:13.173: W/Adreno-GSL(31852): <log_gpu_snapshot:308>: panel.gpuSnapshotPath is not set.not generating user snapshot
03-15 22:33:13.173: W/Adreno-GSL(31852): <gsl_ldd_control:393>: ioctl fd 55 code 0xc0140910 (IOCTL_KGSL_RINGBUFFER_ISSUEIBCMDS) failed: errno 35 Resource deadlock would occur
03-15 22:33:13.173: W/Adreno-GSL(31852): <log_gpu_snapshot:308>: panel.gpuSnapshotPath is not set.not generating user snapshot
我已将其缩小到我的广告移动代码。如果我将下面的代码放在我的主要活动的onCreate或onResume部分,它会因上述错误(Samsung Galaxy S4)而崩溃。如果延迟后添加,似乎不是问题。
if (adView == null && GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext()) == ConnectionResult.SUCCESS){
adView = new AdView(this);
if (adView != null){
adView.setAdSize(AdSize.SMART_BANNER);
adView.setAdUnitId(AD_UNIT_ID);
LinearLayout layout = (LinearLayout) findViewById(R.id.addBar);
if (layout != null){
layout.addView(adView);
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.addTestDevice("B3EEABB8EE11C2BE770B684D95219ECB")
.build();
adView.loadAd(adRequest);
}
}
}
答案 0 :(得分:0)
尝试使用以下代码: 还可以将您的应用程序用于不同的设备,以便您能够看到真正的问题
if (adView == null && GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext()) == ConnectionResult.SUCCESS){
adView = new AdView(this);
adView.setAdSize(AdSize.SMART_BANNER);
adView.setAdUnitId(AD_UNIT_ID);
LinearLayout layout = (LinearLayout) findViewById(R.id.addBar);
layout.addView(adView);
AdRequest adRequest = new AdRequest.Builder().build();
adView.loadAd(adRequest);
}