问题描述
最近,我不能,如果在YouTube API演示Android的任何运行。
instanciating有一定的依赖性至YouTube API类的第一个活动时,我得到一个ClassNotFoundException。
这种情况与一个使用YouTube API的任何应用程序。
Lately I am not able to run any if the YouTube API Demos for Android.I get a ClassNotFoundException when instanciating the first activity that has some dependency to the YouTube API class.This happens with any app that uses the YouTube API.
我的YouTube应用程序更新到4.5。+,和我在三星Galaxy S3迷你运行软糖。
My YouTube app is updated to 4.5.+, and I'm running JellyBean on a Samsung Galaxy s3 mini.
是否有任何设置,我可以在我的手机还是在Eclipse?
Is there any setup I can be missing in my phone or in Eclipse ?
这里是logcat的副本(这次是Nexus S的运行):
Here is the logcat copy (this time run on a Nexus S):
06-18 09:45:26.796: D/libEGL(15140): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
06-18 09:45:26.832: D/libEGL(15140): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
06-18 09:45:26.836: D/libEGL(15140): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
06-18 09:45:26.964: D/OpenGLRenderer(15140): Enabling debug mode 0
06-18 09:45:35.796: W/dalvikvm(15140): Unable to resolve superclass of Lcom/examples/youtubeapidemo/YouTubeFailureRecoveryActivity; (109)
06-18 09:45:35.796: W/dalvikvm(15140): Link of class 'Lcom/examples/youtubeapidemo/YouTubeFailureRecoveryActivity;' failed
06-18 09:45:35.804: W/dalvikvm(15140): Unable to resolve superclass of Lcom/examples/youtubeapidemo/PlayerViewDemoActivity; (102)
06-18 09:45:35.804: W/dalvikvm(15140): Link of class 'Lcom/examples/youtubeapidemo/PlayerViewDemoActivity;' failed
06-18 09:45:35.820: D/AndroidRuntime(15140): Shutting down VM
06-18 09:45:35.820: W/dalvikvm(15140): threadid=1: thread exiting with uncaught exception (group=0x41a1a300)
06-18 09:45:35.855: E/AndroidRuntime(15140): FATAL EXCEPTION: main
06-18 09:45:35.855: E/AndroidRuntime(15140): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.examples.youtubeapidemo/com.examples.youtubeapidemo.PlayerViewDemoActivity}: java.lang.ClassNotFoundException: com.examples.youtubeapidemo.PlayerViewDemoActivity
06-18 09:45:35.855: E/AndroidRuntime(15140): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1983)
06-18 09:45:35.855: E/AndroidRuntime(15140): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
06-18 09:45:35.855: E/AndroidRuntime(15140): at android.app.ActivityThread.access$600(ActivityThread.java:130)
06-18 09:45:35.855: E/AndroidRuntime(15140): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
06-18 09:45:35.855: E/AndroidRuntime(15140): at android.os.Handler.dispatchMessage(Handler.java:99)
06-18 09:45:35.855: E/AndroidRuntime(15140): at android.os.Looper.loop(Looper.java:137)
06-18 09:45:35.855: E/AndroidRuntime(15140): at android.app.ActivityThread.main(ActivityThread.java:4745)
06-18 09:45:35.855: E/AndroidRuntime(15140): at java.lang.reflect.Method.invokeNative(Native Method)
06-18 09:45:35.855: E/AndroidRuntime(15140): at java.lang.reflect.Method.invoke(Method.java:511)
06-18 09:45:35.855: E/AndroidRuntime(15140): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
06-18 09:45:35.855: E/AndroidRuntime(15140): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
06-18 09:45:35.855: E/AndroidRuntime(15140): at dalvik.system.NativeStart.main(Native Method)
06-18 09:45:35.855: E/AndroidRuntime(15140): Caused by: java.lang.ClassNotFoundException: com.examples.youtubeapidemo.PlayerViewDemoActivity
06-18 09:45:35.855: E/AndroidRuntime(15140): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
06-18 09:45:35.855: E/AndroidRuntime(15140): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
06-18 09:45:35.855: E/AndroidRuntime(15140): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
06-18 09:45:35.855: E/AndroidRuntime(15140): at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
06-18 09:45:35.855: E/AndroidRuntime(15140): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
06-18 09:45:35.855: E/AndroidRuntime(15140): ... 11 more
[解决!]
酷我找到了答案。似乎是在后期ADT更新的错误。此链接解释这一切:https://groups.google.com/d/msg/adt-dev/epOfZbKPFdk/v4a-pTbq1OwJ
Cool I found the answer. Seems to be a bug in a late ADT update. This link explains it all: https://groups.google.com/d/msg/adt-dev/epOfZbKPFdk/v4a-pTbq1OwJ
或者引用它:
右键单击项目>属性> Java构建路径>订单和出口>检查Android的私家藏书>确定
Project right-click > Properties > Java Build Path > Order and Export > Check Android Private Libraries > OK
然后项目>清除...
Then Project > Clean...
和重建/运行。
推荐答案
似乎是在后期ADT更新的错误。此链接解释这一切:https://groups.google.com/d/msg/adt-dev/epOfZbKPFdk/v4a-pTbq1OwJ
Seems to be a bug in a late ADT update. This link explains it all: https://groups.google.com/d/msg/adt-dev/epOfZbKPFdk/v4a-pTbq1OwJ
或者引用它:
右键单击项目>属性> Java构建路径>订单和出口>检查Android的私家藏书>确定
Project right-click > Properties > Java Build Path > Order and Export > Check Android Private Libraries > OK
然后项目>清除...
Then Project > Clean...
和重建/运行。
这篇关于类运行的YouTube API演示为Android时,未发现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!