KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I work with eclipse Version: Indigo Service Release 2 Build id: 20120216-1857. The Android version ist 2.2. I make an app to test a connect and parse a web site like this: public class TestActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); try { Document doc = Jsoup.connect("http://example.com/").get(); Elements divs = doc.select("div#test"); for (Element div : divs) { System.out.println(div.text()); } } catch (Exception e) { } } } Manifest file: android:installLocation="preferExternal" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" /> <uses-permission android:name="android.permission.INTERNET" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name=".TestActivity" android:label="@string/app_name" android:configChanges="orientation" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <uses-library android :name="org.jsoup.Jsoup" /> </activity> </application> I add the library jsoup-1.6.1.jar to JAVA Buildpath, but I become the runtime error: E/AndroidRuntime(736): java.lang.NoClassDefFoundError: org.jsoup.Jsoup How can I resolve this error?
Tags (comma-separated)
Save Edits
Cancel