Android Studio 1.2.2 ClassNotFoundException android.widget.viewstub [英] Android Studio 1.2.2 ClassNotFoundException android.widget.viewstub

查看:625
本文介绍了Android Studio 1.2.2 ClassNotFoundException android.widget.viewstub的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了Android Studio,每当我启动一个项目时(甚至是IDE创建的默认Hello world活动)。

I just installed Android Studio and whenever I start a project (even the default "Hello world" activity created by the IDE).

我有这个引发的异常:


java.lang.ClassNotFoundException :没有在路径上找到类
android.widget.ViewStub:DexPathList [[zip file
/data/app/com.example.noname.exceptiontest-2/base.apk] ,nativeLibraryDirectories = [/ vendor / lib
/ system / lib]]

java.lang.ClassNotFoundException: Didn't find class "android.widget.ViewStub" on path: DexPathList[[zip file "/data/app/com.example.noname.exceptiontest-2/base.apk"],nativeLibraryDirectories=[/vendor/lib /system/lib]]

我希望我有一些logcat来展示但是它似乎没有记录此异常。

I wished I had some logcat to show but it doesn't seems like this exception is logged in it.

它不会停止项目或我工作的任何其他项目,每次运行我的时候都会因为这个例外的堆栈而感到有点沮丧调试中的项目。

It doesn't stop the project or any other project that I have from working, just a little bit frustrating to go through the stack of this exception every time I run my projects in debug.

浏览互联网后,似乎很多人都没有这个问题,只有符合我的问题的答案才会成为Android工作室的问题。然而,这些答案的日期超过一年。

After looking around the Internet it doesn't seem that that many people have this problem, only answer that would match my issue would be a problem with Android studio. However those answers dated from more than one year.

我刚刚更换了我的电脑,想要从Eclipse迁移到Android Studio,以便在我的空闲时间进行一些开发。我暂时无法访问我以前的环境,尝试安装Android工作室并重现该错误。

I just changed my computer and wanted to move from Eclipse to Android Studio to do some development on my free time. I don't have access to my previous environment for the moment to try to install Android studio and reproduce that error.

有没有人或已经有此错误? (要重现新的Hello world活动,请在Android Studio中激活任何异常并在调试中运行)

Does anyone have or already had this error ? (To reproduce New Hello world Activity, activate any exception in Android Studio and run in debug)

干杯

推荐答案

如果因为设置了异常断点而得到此异常,则不是调试,而是删除所有断点,只需运行代码,转到logcat并检查日志中的实际异常。
您可能正在尝试从祖父母那样访问嵌套组件,例如按钮,因此错误。

If you are getting this exception because you have set exception breakpoint, then instead of debugging, remove all breakpoints, just run the code,go to logcat and check the logs for the actual exception. You could be trying to access a nested component like button from the grandparent and therefore the error.

这篇关于Android Studio 1.2.2 ClassNotFoundException android.widget.viewstub的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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