在活动中播放视频youtube时出现java.lang.NoClassDefFoundError

时间:2018-02-23 22:27:43

标签: android youtube-api

任何人都可以帮我解决这个问题,当我开始在我的android活动中播放YouTube视频时,它会出现:

java.lang.NoClassDefFoundError: prg
                      at prf.<clinit>(SourceFile:2)
                      at prd.onAnimationEnd(SourceFile:10)
                      at android.animation.AnimatorSet$AnimatorSetListener.onAnimationEnd(AnimatorSet.java:818)
                      at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1056)
                      at android.animation.ValueAnimator.access$400(ValueAnimator.java:50)
                      at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:644)
                      at android.animation.ValueAnimator$AnimationHandler.run(ValueAnimator.java:660)
                      at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
                      at android.view.Choreographer.doCallbacks(Choreographer.java:574)
                      at android.view.Choreographer.doFrame(Choreographer.java:543)
                      at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
                      at android.os.Handler.handleCallback(Handler.java:733)
                      at android.os.Handler.dispatchMessage(Handler.java:95)
                      at android.os.Looper.loop(Looper.java:136)
                      at android.app.ActivityThread.main(ActivityThread.java:5019)
                      at java.lang.reflect.Method.invokeNative(Native Method)
                      at java.lang.reflect.Method.invoke(Method.java:515)
                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
                      at dalvik.system.NativeStart.main(Native Method)

1 个答案:

答案 0 :(得分:2)

youtube android API上的Bug,它只发生在android 4.4 API 19中 Check this

我们正在等待来自Google的解决方案,我现在正在使用此Android-YouTube-Player而不是官方的youtube API及其工作良好,实际上它比Youtube官方API更好