주머니 응용 프로그램과 같은 텍스트 문서를 가져 오기 위해 보일러 파이프를 사용하려고합니다. Android Studio : 보일러 파이프의 java.lang.NoClassDefFoundError
- 깨끗하고 구축 : 응용 프로그램이 제대로 컴파일하지만 런타임 예외가 있습니다 : 여기
내가 이미 시도한 것들을됩니다java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:309) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354) at java.util.concurrent.FutureTask.setException(FutureTask.java:223) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.NoClassDefFoundError: de.l3s.boilerpipe.sax.BoilerpipeHTMLParser at de.l3s.boilerpipe.sax.BoilerpipeSAXInput.getTextDocument(BoilerpipeSAXInput.java:51) at de.l3s.boilerpipe.extractors.ExtractorBase.getText(ExtractorBase.java:69) at de.l3s.boilerpipe.extractors.ExtractorBase.getText(ExtractorBase.java:87) at com.example.pushpankar.fastreader.ReadView$fetchUrlTxt.doInBackground(ReadView.java:154) at com.example.pushpankar.fastreader.ReadView$fetchUrlTxt.doInBackground(ReadView.java:147) at android.os.AsyncTask$2.call(AsyncTask.java:295) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)
github에 같은 버그가 게시되었습니다.
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.example.pushpankar.fastreader"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile project(':boilerpipe-1.2.0-android')
compile project(':xerces-for-android')
compile project(':nekohtml')
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:support-v4:25.0.1'
testCompile 'junit:junit:4.12'
compile files('libs/slf4j-android-1.6.1-RC1.jar')
}
Android 라이브러리의 코드에 [NoClassDefFoundError]가 중복 될 수 있습니다. (http://stackoverflow.com/questions/8678630/noclassdeffounderror-for-code-in-an-java-library-on-android) – sushildlh
android studio와 비슷한 접근 방식을 가졌지 만 작동하지 않았습니다. – user3125971