【问题标题】:What does "W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@eb23963" mean?“W/ActivityThread:handleWindowVisibility:token android.os.BinderProxy@eb23963 没有活动”是什么意思?
【发布时间】:2019-06-24 15:37:16
【问题描述】:

当我按下按钮切换到另一个活动时,我得到这个:“W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@eb23963”

即使是 android 示例:https://github.com/google-developer-training/android-fundamentals-apps-v2/tree/master/TwoActivities/app/src/main/java/com/example/android/twoactivities

为什么?

【问题讨论】:

  • 查看ActivityThread的源代码。我看到当在mActivies列表中找不到ActivityClientRecord时它会被抛出。所以这是调用警告的地方。我还没找到原因。
  • 是的,我不知道为什么。谢谢

标签: android android-activity


【解决方案1】:

请检查您的第二个 Activity 中是否存在您想要继续单击按钮的无限循环。

我在使用 rewardVideoAd 时遇到了同样的问题:

之前:

private void loadRewardedVideoAd() {
    if (!mRewardedVideoAd.isLoaded()) {
        //Demo ad
        mRewardedVideoAd.loadAd("ca-app-pub-3940256099942544/5224354917",
                new AdRequest.Builder().build());

        if (ad.getVisibility() == View.VISIBLE) {
            ad.setVisibility(View.INVISIBLE);
        }
        loadRewardedVideoAd();
    }
    else {
        //Toast.makeText(this, "Ad Already loaded", Toast.LENGTH_SHORT).show();

    }
}

之后

private void loadRewardedVideoAd() {
    if (!mRewardedVideoAd.isLoaded()) {
        //Demo ad
        mRewardedVideoAd.loadAd("ca-app-pub-3940256099942544/5224354917",
                new AdRequest.Builder().build());

        if (ad.getVisibility() == View.VISIBLE) {
            ad.setVisibility(View.INVISIBLE);
        }
        //loadRewardedVideoAd(); // I removed this line
    }
    else {
        //Toast.makeText(this, "Ad Already loaded", Toast.LENGTH_SHORT).show();

    }
}

希望对你有帮助!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-09-26
    • 2010-11-19
    • 2020-04-27
    • 2015-01-05
    • 2015-03-26
    • 2020-01-10
    • 2019-10-31
    • 1970-01-01
    相关资源
    最近更新 更多