问题ActionBarActivityDelegate类.....应用程序不运行 [英] Issue with ActionBarActivityDelegate class.....app doesn't run

查看:131
本文介绍了问题ActionBarActivityDelegate类.....应用程序不运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我希望有人能帮助我与他 我正打算把一个操作栏在我的测试应用程序,所以我也正是因为在开发API介绍说。

Hello i hope someone can help me with his I was planning to put an action bar in my test app, so I did exactly as said in the developers API guide.

但是,当我试图编译它抛出这个错误(logcat中):

But when i tried to compile it it throw this error (logcat):

java.lang.ExceptionInInitializerError
at android.support.v7.app.ActionBarActivityDelegate.createDelegate()
at android.support.v7.app.ActionBarActivity.onCreate().....
..... 
Caused by: java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$attr
at android.support.v7.app.ActionBarActivityDelegateBase.<clinit>

什么情况是,应用程序是否正确安装到我的手机,但之前它显示任何UI,它引发错误,并关闭。

What happens is that the app is correctly installed into my phone but even before it shows any UI, it throws the error and closes.

我甚至尝试用最简单的应用程序(Hello World示例),并说同样的事情 我试了一下在这两个真正的电话和模拟,以及相同的结果。

I even tried with the most simple app ("hello world example") and says the same thing I tried it in both real phone and simulator, and same result

任何想法如何解决????似乎有该类ActionBarActivityDelegateBase没有定义,但我找不到导游的任何引用该类或任何其他网站

Any ideas how to fix that???? Seems that there is no definition for the class ActionBarActivityDelegateBase, but i cannot find any reference to that class in the guides or any other website

推荐答案

我有这样的错误,问题是,我没有补充的lib与资源。 你不能只是增加了罐子,因为它不会增加的资源。你必须从放入系统库创建一个项目,然后添加该项目作为库到自己的项目。

I had that error, and the problem was that I hadn't added the lib with the resources. You can't just add the jars, because it will not add the resources. You have to create a project from thoses libs and then add the project as a library to your own project.

下面是说明如何:

去这个链接,进入添加与资源库部分。

Go to this link and go to the "Adding libraries with resources" section

<一个href="http://developer.android.com/tools/support-library/setup.html">http://developer.android.com/tools/support-library/setup.html

这解决了这个问题对我来说。

This fixed the problem for me.

干杯

这篇关于问题ActionBarActivityDelegate类.....应用程序不运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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