Android的 - 无法实例活动 - 级升级到22 ADT后未发现异常 [英] Android - Unable to instantiate activity - Class not found exception after upgrading to ADT 22

查看:154
本文介绍了Android的 - 无法实例活动 - 级升级到22 ADT后未发现异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的ADT最近升级到版本22。 之后,我已经这样做了,我第一次收到一个错误与我的支持库(这是依赖于另一个库项目)。 之后我抄了支持库到我的项目,并清理所有的项目中,我不断收到以下错误,当我尝试启动我的应用程序:

I have recently upgraded my ADT to version 22. After I have done so, I first received an error with my support library (which was relied on another library project). After I have copied the support library to my project and cleaned all my projects, I keep receiving the following errors when I try to launch my application:

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.d.d/com.d.d.MainActivity}: java.lang.ClassNotFoundException: com.d.d.MainActivity

(我已经改名为com.dd真正的包名)

(I have renamed the real package name to com.d.d)

但是,是什么让我怀疑它是支持库的变化的原因,是以下行:

But what keeps me suspicious that it is a cause of the support library changes, is the following line:

at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)

这让我怀疑,因为我以前乱七八糟的支持库,我收到了相关的DEX的东西很多错误。

It keeps me suspicious because when I have messed with the support library before, I received many errors that are related to dex something.

不用说,该AndroidManifest包含该活动的正确的路径。

Needless to say, the AndroidManifest contains the correct path for the activity.

任何帮助将在这里pciated多少AP $ P $。 非常感谢。

Any help will be much appreciated here. Thanks a lot.

推荐答案

可能是<一个副本href="http://stackoverflow.com/questions/16610190/classnotfoundexception-after-adt-update">this.

尝试将项目 - >属性 - > Java构建路径 - >在线订单和放大器;导出并保证    Android的私人图书馆被选中的为您的项目和其他所有库项目的你使用。清理所有项目   事后,看看会发生什么。

Try going to Project -> Properties -> Java Build Path -> Order & Export and ensure Android Private Libraries are checked for your project and for all other library projects you are using. Clean all projects afterwards and see what happens.

这篇关于Android的 - 无法实例活动 - 级升级到22 ADT后未发现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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