简体   繁体   English

媒体播放器在Real Device Android上崩溃

[英]Media Player Crashes on Real Device Android

I have a songs in list view which i am getting it from json service. 我在列表视图中有一首歌,我从json服务获取它。 I have a play button, Facebook and Twitter Share Button on every row. 我在每一行都有一个播放按钮,Facebook和Twitter分享按钮。 When i click on play button song starts and seek bar & Fb Twitter sharing also working Fine. 当我点击播放按钮歌曲开始和寻求酒吧和Fb Twitter分享也工作正常。 Its working fine on emulator and as well as in mobile. 它在模拟器和移动设备上运行良好。 But i am developing this app for android TV, & in Android TV when i click on Play and Share Button everything crashes, TV and my mobile has same API version. 但是我正在为Android TV开发这个应用程序,在Android TV中,当我点击播放和分享按钮时,一切都崩溃了,电视和我的手机有相同的API版本。 Please Help. 请帮忙。

I hear about androidSupportrTl:true ? 我听说androidSupportrTl:是吗? is this working for this issue ? 这适用于这个问题吗?

When i click on play button On Tv No error found Log Cat : 当我点击播放按钮On Tv No error found Log Cat:

01-10 07:13:33.501 17284-17293/luck.materialdesign.tabsnavigator I/art: Thread[5,tid=17293,WaitingInMainSignalCatcherLoop,Thread*=0xab8d8600,peer=0x12c000a0,"Signal Catcher"]: reacting to signal 3
01-10 07:13:34.273 17284-17293/luck.materialdesign.tabsnavigator I/art: Wrote stack traces to '/data/anr/traces.txt'

android:supportsRtl="true" only means that if you set supportsRtl true , your layout will be mirrored from right to left. android:supportsRtl="true"只表示如果你设置supportsRtl true ,你的布局将从右到左镜像。 So you do not have to create special layout for it. 所以你不必为它创建特殊的布局。 It just declares whether your application is willing to support right-to-left (RTL) layouts. 它只是声明您的应用程序是否愿意支持从右到左(RTL)布局。

If set to true and targetSdkVersion is set to 17 or higher, various RTL APIs will be activated and used by the system so your app can display RTL layouts. 如果设置为true且targetSdkVersion设置为17或更高,则系统将激活并使用各种RTL API,以便您的应用程序可以显示RTL布局。 If set to false or if targetSdkVersion is set to 16 or lower, the RTL APIs will be ignored or will have no effect and your app will behave the same regardless of the layout direction associated to the user's Locale choice (your layouts will always be left-to-right). 如果设置为false或者targetSdkVersion设置为16或更低,则RTL API将被忽略或无效,并且无论与用户的Locale选项关联的布局方向如何,您的应用都将表现相同(您的布局将始终保持不变-to-右)。

The default value of this attribute is false . 此属性的默认值为false

This might be because of your layout. 这可能是因为你的布局。 According to this thread , you need to fix your layout accordingly. 根据这个帖子 ,你需要相应地修复你的布局。 Make sure that the API version you are using is supported in your Android TV. 确保Android TV支持您使用的API版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM