当我初始化 AdMob 时:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_menu);
MobileAds.initialize(getApplicationContext(), "ca-app-pub-123");
...
我的应用程序比平常多花 2 秒来加载这个 Activity 并在日志中得到这个:
W/art: Long monitor contention event with owner method=void java.lang.Thread.nativeCreate(java.lang.Thread, long, boolean) from Thread.java:4294967294 waiters=1 for 439ms
>
W/art: Long monitor contention event with owner method=void java.lang.Thread.nativeCreate(java.lang.Thread, long, boolean) from Thread.java:4294967294 waiters=0 for 441ms
>
W/art: Long monitor contention event with owner method=void java.lang.Thread.nativeCreate(java.lang.Thread, long, boolean) from Thread.java:4294967294 waiters=2 for 442ms
>
W/art: Long monitor contention event with owner method=void java.lang.Thread.nativeCreate(java.lang.Thread, long, boolean) from Thread.java:4294967294 waiters=4 for 442ms
>
W/art: Long monitor contention event with owner method=void java.lang.Thread.nativeCreate(java.lang.Thread, long, boolean) from Thread.java:4294967294 waiters=5 for 442ms
>
W/art: Long monitor contention event with owner method=void java.lang.Thread.nativeCreate(java.lang.Thread, long, boolean) from Thread.java:4294967294 waiters=6 for 440ms
如果我删除初始化行,所有运行速度都很快,日志中没有任何内容。
(即使出现此错误,广告也能正常工作,但延迟很烦人)
有人知道这是从哪里来的吗?我清理了项目,但没有任何改变。