java.lang.ClassNotFoundException:找不到与TeamCity构建相关的类 [英] java.lang.ClassNotFoundException: Didn't find class with TeamCity build

查看:96
本文介绍了java.lang.ClassNotFoundException:找不到与TeamCity构建相关的类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将android-support-v7-appcompat和google-play-services_lib添加到Android项目应用程序后,开始于 java.lang.ClassNotFoundException异常.

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.

我阅读了有关此问题的有关StackOverflow的所有问题,并打开了Eclipse-> Java Build Path-> Order and Export,并验证了以下内容: 在此,选中了Android私有库,Android依赖项,Google Play Services.jar,并且取消选中了Android API.

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.

因此本地构建的apk可以正常工作.但是在TeamCity方面,由于异常而导致崩溃的apk.因此,我想,我需要对有关android-support-v7-appcompat的Ant脚本进行一些更改.

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.

推荐答案

ClassNotFoundException就是这样.找不到引用类.使用第三方库时,必须确保它们的依存关系(如果有)也包含在您的类路径中.

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.

希望有帮助.

这篇关于java.lang.ClassNotFoundException:找不到与TeamCity构建相关的类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆