我是一名 Java 人,最近开始探索 Android,我正在使用 android 开发 Youtube Data API 来查询 youtube 视频。
我在我的项目依赖项中添加了以下 jar 作为外部 jar。
- 激活.jar
- gdata-client-1.0.jar
- gdata-client-meta-1.0.jar
- gdata-core-1.0.jar
- gdata-youtube-2.0.jar
- 邮件.jar
- servlet-api.jar
代码编译得很好,但是当我在模拟器中运行应用程序时,我得到了这个异常
AndroidRuntime(784): java.lang.NoClassDefFoundError: com.google.gdata.client.youtube.YouTubeQuery
我正在使用日食朱诺。
这是我的 .classpath
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="lib" path="C:/apache-tomcat-6.0.36-windows-x64/apache-tomcat-6.0.36/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="C:/Vishwas/gdata-samples.java-1.47.1/gdata/java/lib/gdata-client-1.0.jar"/>
<classpathentry kind="lib" path="C:/Vishwas/gdata-samples.java-1.47.1/gdata/java/lib/gdata-client-meta-1.0.jar"/>
<classpathentry kind="lib" path="C:/Vishwas/gdata-samples.java-1.47.1/gdata/java/lib/gdata-core-1.0.jar"/>
<classpathentry kind="lib" path="C:/Vishwas/gdata-samples.java-1.47.1/gdata/java/lib/gdata-youtube-2.0.jar"/>
<classpathentry kind="lib" path="C:/Users/Vishwas/Downloads/activation.jar"/>
<classpathentry kind="lib" path="C:/Users/Vishwas/Downloads/mail.jar"/>
<classpathentry kind="lib" path="libs/activation.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
谢谢