且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

java.lang.NoClassDefFoundError的,而在Netbeans的运行JUnit测试

更新时间:2023-11-19 23:31:52

检查您的测试项目清单,例如 HelloWorldTest / AndroidManifest.xml中。该安卓targetPackage 仪器仪表标记应针对包在你的应用程序,例如属性, com.example.helloworld 的测试包的测试项目(如 com.example.helloworld.test )。

Check the manifest of your test project, for example HelloWorldTest/AndroidManifest.xml. The android:targetPackage attribute of the instrumentation markup should target the package in your application, for example, com.example.helloworld. Not the test package of your test project (eg. com.example.helloworld.test).