最近,我无法运行任何适用于
Android的YouTube API演示版.
在实现与YouTube API类有一定依赖关系的第一个活动时,我得到一个ClassNotFoundException.
任何使用YouTube API的应用都会发生这种情况.
在实现与YouTube API类有一定依赖关系的第一个活动时,我得到一个ClassNotFoundException.
任何使用YouTube API的应用都会发生这种情况.
我的YouTube应用已更新至4.5.,我在三星Galaxy s3 mini上运行JellyBean.
我的手机或Eclipse中是否有任何设置可以丢失?
[编辑]
这是logcat副本(这次在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
或者引用它:
项目右键单击>属性> Java构建路径>订单和出口>检查Android私有库>好
然后项目>清洁…
并重建/运行.
解决方法
似乎是ADT后期更新中的一个错误.此链接解释了所有内容:
https://groups.google.com/d/msg/adt-dev/epOfZbKPFdk/v4a-pTbq1OwJ
或者引用它:
项目右键单击>属性> Java构建路径>订单和出口>检查Android私有库>好
然后项目>清洁…
并重建/运行.