活动已泄露ServiceConnection com.google.android.youtube.player.internal.r$e@42201a30原来是订在这里的
当执行我的应用程序时,我在logcat中收到此消息 活动com.jeslomo.judokatium_2.CinturonActivity已泄露 服务连接 com.google.android.youtube.player.internal.r$e@42201a30那是 原订于此 我尝试加载youtube的意图: Intent Intent=YouTubeStandalonePlayer.createVideoIntent(acty, API_密钥,videoId,0,false,false); 行动触觉(意图) 但是视频加载是正确的 “acty”是我传递给BaseAdapter以加载视频的活动 我如何解决它 谢谢活动已泄露ServiceConnection com.google.android.youtube.player.internal.r$e@42201a30原来是订在这里的,android,android-intent,youtube,Android,Android Intent,Youtube,当执行我的应用程序时,我在logcat中收到此消息 活动com.jeslomo.judokatium_2.CinturonActivity已泄露 服务连接 com.google.android.youtube.player.internal.r$e@42201a30那是 原订于此 我尝试加载youtube的意图: Intent Intent=YouTubeStandalonePlayer.createVideoIntent(acty, API_密钥,videoId,0,false,false);
p.D:对不起,我的英语不好。请试试这个,希望它有用: 当第二个页面出现时加载api,然后初始化YouTube api。尝试将应用程序上下文提供给api,而不是将活动作为上下文提供
Intent intent = YouTubeStandalonePlayer.createVideoIntent(getApplicationContext(), API_KEY , videoId, 0, false, false);
acty.startActivity(intent);
您好,如果我在活动“YouTubeplyer.OnInitializedListener”中实现,尽管他的方法为空,但不要崩溃!谢谢你的回答!