我正在尝试将Youtube API集成到我的项目中。为此,
程序在构建时没有显示错误。但是,当我尝试初始化时显示以下日志。请帮忙:
06-25 18:26:15.813: E/AndroidRuntime(6197): FATAL EXCEPTION: main
06-25 18:26:15.813: E/AndroidRuntime(6197): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.deltapath.frSIP/hk.d100.VideoPlayer}: java.lang.IllegalArgumentException: callingAppVersion cannot be null or empty
06-25 18:26:15.813: E/AndroidRuntime(6197): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
06-25 18:26:15.813: E/AndroidRuntime(6197): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
06-25 18:26:15.813: E/AndroidRuntime(6197): at android.app.ActivityThread.access$600(ActivityThread.java:141)
06-25 18:26:15.813: E/AndroidRuntime(6197): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
06-25 18:26:15.813: E/AndroidRuntime(6197): at android.os.Handler.dispatchMessage(Handler.java:99)
06-25 18:26:15.813: E/AndroidRuntime(6197): at android.os.Looper.loop(Looper.java:137)
06-25 18:26:15.813: E/AndroidRuntime(6197): at android.app.ActivityThread.main(ActivityThread.java:5041)
06-25 18:26:15.813: E/AndroidRuntime(6197): at java.lang.reflect.Method.invokeNative(Native Method)
06-25 18:26:15.813: E/AndroidRuntime(6197): at java.lang.reflect.Method.invoke(Method.java:511)
06-25 18:26:15.813: E/AndroidRuntime(6197): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
06-25 18:26:15.813: E/AndroidRuntime(6197): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
06-25 18:26:15.813: E/AndroidRuntime(6197): at dalvik.system.NativeStart.main(Native Method)
06-25 18:26:15.813: E/AndroidRuntime(6197): Caused by: java.lang.IllegalArgumentException: callingAppVersion cannot be null or empty
06-25 18:26:15.813: E/AndroidRuntime(6197): at com.google.android.youtube.player.internal.ac.a(Unknown Source)
06-25 18:26:15.813: E/AndroidRuntime(6197): at com.google.android.youtube.player.internal.o.<init>(Unknown Source)
06-25 18:26:15.813: E/AndroidRuntime(6197): at com.google.android.youtube.player.internal.ad.a(Unknown Source)
06-25 18:26:15.813: E/AndroidRuntime(6197): at com.google.android.youtube.player.YouTubePlayerView.a(Unknown Source)
06-25 18:26:15.813: E/AndroidRuntime(6197): at com.google.android.youtube.player.YouTubeBaseActivity$a.a(Unknown Source)
06-25 18:26:15.813: E/AndroidRuntime(6197): at com.google.android.youtube.player.YouTubePlayerView.initialize(Unknown Source)
06-25 18:26:15.813: E/AndroidRuntime(6197): at hk.d100.VideoPlayer.onCreate(VideoPlayer.java:42)
06-25 18:26:15.813: E/AndroidRuntime(6197): at android.app.Activity.performCreate(Activity.java:5104)
06-25 18:26:15.813: E/AndroidRuntime(6197): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
06-25 18:26:15.813: E/AndroidRuntime(6197): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
06-25 18:26:15.813: E/AndroidRuntime(6197): ... 11 more
答案 0 :(得分:0)
如果可能,请包含您对YouTube API的使用(而不仅仅是堆栈跟踪),以便其他人可以帮助您。