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

查看:33
本文介绍了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天全站免登陆