Can't run Roboelectric test

∥☆過路亽.° 提交于 2019-11-30 17:18:44

问题


I keep on getting

java.lang.NoClassDefFoundError: android/content/pm/PackageManager$NameNotFoundException ... java.lang.ClassNotFoundException: couldn't load android.content.pm.PackageManager$NameNotFoundException... Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)

Any idea what causes this and how to get it fixed?


回答1:


your jar file may be corruptedso re add the jar file orrebuild the path of jar file ... clean the project and re run it.




回答2:


You need install sources for android-21 from Android SDK



来源:https://stackoverflow.com/questions/33303739/cant-run-roboelectric-test

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!