我正在调整Google Cast代码,提供了here.
我已完成整个工作空间设置,但是,当尝试在AndroID手机上运行示例应用程序时,我收到以下错误.
我刚刚将包名称指定为app ID.我在哪里可以获得应用ID?我应该向Google注册以获取应用ID吗?它是如何工作的?
02-13 23:36:00.995: E/AndroIDRuntime(8310): FATAL EXCEPTION: main02-13 23:36:00.995: E/AndroIDRuntime(8310): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.Google.sample.cast.refplayer/com.Google.sample.cast.refplayer.VIDeobrowserActivity}: java.lang.IllegalArgumentException: InvalID appliation ID: com.Google.sample.cast.refplayer02-13 23:36:00.995: E/AndroIDRuntime(8310): at androID.app.ActivityThread.performlaunchActivity(ActivityThread.java:1967)02-13 23:36:00.995: E/AndroIDRuntime(8310): at androID.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)02-13 23:36:00.995: E/AndroIDRuntime(8310): at androID.app.ActivityThread.access0(ActivityThread.java:127)02-13 23:36:00.995: E/AndroIDRuntime(8310): at androID.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)02-13 23:36:00.995: E/AndroIDRuntime(8310): at androID.os.Handler.dispatchMessage(Handler.java:99)02-13 23:36:00.995: E/AndroIDRuntime(8310): at androID.os.Looper.loop(Looper.java:137)02-13 23:36:00.995: E/AndroIDRuntime(8310): at androID.app.ActivityThread.main(ActivityThread.java:4511)02-13 23:36:00.995: E/AndroIDRuntime(8310): at java.lang.reflect.Method.invokeNative(Native Method)02-13 23:36:00.995: E/AndroIDRuntime(8310): at java.lang.reflect.Method.invoke(Method.java:511)02-13 23:36:00.995: E/AndroIDRuntime(8310): at com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)02-13 23:36:00.995: E/AndroIDRuntime(8310): at com.androID.internal.os.ZygoteInit.main(ZygoteInit.java:747)02-13 23:36:00.995: E/AndroIDRuntime(8310): at dalvik.system.NativeStart.main(Native Method)02-13 23:36:00.995: E/AndroIDRuntime(8310): Caused by: java.lang.IllegalArgumentException: InvalID appliation ID: 02-13 23:36:00.995: E/AndroIDRuntime(8310): at com.Google.androID.gms.cast.CastMediaControlintent.a(UnkNown Source)02-13 23:36:00.995: E/AndroIDRuntime(8310): at com.Google.androID.gms.cast.CastMediaControlintent.categoryForCast(UnkNown Source)02-13 23:36:00.995: E/AndroIDRuntime(8310): at com.Google.sample.castcompanionlibrary.cast.BaseCastManager.<init>(BaseCastManager.java:183)02-13 23:36:00.995: E/AndroIDRuntime(8310): at com.Google.sample.castcompanionlibrary.cast.VIDeoCastManager.<init>(VIDeoCastManager.java:215)02-13 23:36:00.995: E/AndroIDRuntime(8310): at com.Google.sample.castcompanionlibrary.cast.VIDeoCastManager.initialize(VIDeoCastManager.java:168)02-13 23:36:00.995: E/AndroIDRuntime(8310): at com.Google.sample.cast.refplayer.CastApplication.getCastManager(CastApplication.java:51)02-13 23:36:00.995: E/AndroIDRuntime(8310): at com.Google.sample.cast.refplayer.VIDeobrowserActivity.onCreate(VIDeobrowserActivity.java:55)02-13 23:36:00.995: E/AndroIDRuntime(8310): at androID.app.Activity.performCreate(Activity.java:4470)02-13 23:36:00.995: E/AndroIDRuntime(8310): at androID.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1052)02-13 23:36:00.995: E/AndroIDRuntime(8310): at androID.app.ActivityThread.performlaunchActivity(ActivityThread.java:1931)02-13 23:36:00.995: E/AndroIDRuntime(8310): ... 11 more02-13 23:36:01.115: D/dalvikvm(8310): GC_CONCURRENT freed 168K, 3% free 13426K/13831K, paused 7ms+7ms02-13 23:36:01.305: I/Process(8310): Sending signal. PID: 8310 SIG: 9
解决方法:
最好的方法是创建自己的接收器(Styled Media Receiver).当您注册时,您会获得一个应用ID;我建议你去Cast developers网站,熟悉Chromecast及其工作原理.获得App ID后,需要将其插入到res / values / string.xml中,其中YOUR_APP_ID字符串为.
总结以上是内存溢出为你收集整理的android – 无效的应用程序ID – chromecast全部内容,希望文章能够帮你解决android – 无效的应用程序ID – chromecast所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)