我在C#中开发了一个UWP音乐应用程序,它在Windows API中使用BackgroundMediaPlayer。 由于我将应用与商店相关联,因此在首次启动应用后,它无法播放声音。
有人有解释或解决方法吗?
答案 0 :(得分:1)
This is the answer from a Microsoft employee:
We have confirmed the root cause and we are getting this fixed. Sorry about that. The workaround is to change your "Package name" to be greater than 20 characters. Please let us know if that works for you.
When I associated my app with the store, my package name got under 20 character; wich was causing the bug. I changed it to be more than 20 char and my app worked well again.
The problem is that any store association or app upload will set back the package name.
Microsoft told me the bug will be fixed. It was on October 1th 2015. Check https://github.com/Microsoft/Windows-universal-samples/issues/141 for more info.
答案 1 :(得分:0)
据我所知,这是Windows 10 RTM中引入的一些错误。此时我建议您使用其他API(如MediaElement)。