0
내가 안드로이드에 대한 단위 테스트를 작성하는 것을 시도하고있다 ClassdefNotFound하지만 실행 내 시험 방법 중 하나에 매우 간단한 코드를 다음 때 나는 "NoClassdefFound"얻을 -error :안드로이드 단위 테스트 -
public void testAAA(){
testAPI1 test = new testAPI1();
test.makeApiCall1();
}
클래스 testAPI1은 다음과 같습니다
public class testAPI1 implements SomeInterface{
public void makeApiCall1(){
//do something
}
}
SomeInterface 잘, 그냥 인터페이스입니다. 그러나 "SomeInterface"를 제거하면 모든 것이 잘 동작합니다.
매니페스트 파일 : 정확히 문제가 무엇인지
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mamlambo.article.simplecalc.test" android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon"
android:label="@string/app_name">
<uses-library android:name="android.test.runner" />
</application>
<uses-sdk android:minSdkVersion="7" />
<instrumentation android:targetPackage="com.mamlambo.article.simplecalc"
android:name="android.test.InstrumentationTestRunner"
android:label="Simple Calc Test"/>
</manifest>
?