我正在尝试将 Goose-2.1.22 实施到我的一个应用程序中。但是,当我尝试使用他们提供给我的基本代码运行我的应用程序时,我收到此错误:
02-16 11:19:55.048 29391-29391/test.package.test2 E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.gravity.goose.Goose
at test.package.test2.Searching_Animation_Screen.goose_it(Searching_Animation_Screen.java:65)
at test.package.test2.Searching_Animation_Screen.onCreate(Searching_Animation_Screen.java:59)
at android.app.Activity.performCreate(Activity.java:5372)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2267)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2359)
at android.app.ActivityThread.access$700(ActivityThread.java:165)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1326)\
这是使用 goose 的代码(方法调用 from onCreate()
)
String url = "http://www.cnn.com/2010/POLITICS/08/13/democrats.social.security/index.html";
Goose goose = new Goose(new Configuration());
Article article = goose.extractContent(url);
System.out.println(article.cleanedArticleText());
text.setText(article.cleanedArticleText().toString());
任何想法如何解决我的问题?感谢大家!