java.lang.ClassNotFoundException: Didn't find class with TeamCity build

穿精又带淫゛_ 提交于 2020-01-17 03:38:06

问题


After adding android-support-v7-appcompat and google-play-services_lib to the Android project application starts to crash right after start with java.lang.ClassNotFoundException exception.

I read all questions on StackOverflow related to this problem, and opened Eclipse -> Java Build Path -> Order and Export and verified that: Android Private Libraries, Android dependencies, Google Play Services.jar are checked and Android API unchecked here.

So apk built locally works fine. But on TeamCity side apk which we get as result crash with exception. So I suppose, that I need to add some changes to Ant script regarding android-support-v7-appcompat.

Please suggest steps which I can try.


回答1:


ClassNotFoundException is exactly that. A class that is references cannot be found. When working with third party libraries, you must ensure that their dependancies (if any) are also included in your class path.

Without seeing the actual stacktrace, its difficult to narrow down the problem, but I would check if the dependancies of the third party libraries that I am adding are also included in the class path.

Hope that helps.



来源:https://stackoverflow.com/questions/38475591/java-lang-classnotfoundexception-didnt-find-class-with-teamcity-build

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