ActionBarActivity:不能被解析为一个类型 [英] ActionBarActivity: cannot be resolved to a type

查看:2275
本文介绍了ActionBarActivity:不能被解析为一个类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的Andr​​oid编程。我下面教程添加一个动作条我使用说明的支持Android 2.1及以上一节中Main_Activity。

I am new to android-programming. I am following this tutorial to add an ActionBar to my Main_Activity using the explanation in the "Support Android 2.1 and Above" section.

我跟着教程中添加库项目。然后添加库,在后点的添加库到你的应用程序项目的:我觉得失去了..主要是因为我没有的添加的由选项本身我的Eclipse。

I followed this tutorial to add a Library-Project. Then after adding the library, at the point "Add the library to your application project: I felt lost .. basically because I don't have the "add" option by itself in my Eclipse ..

不过,我点击了添加库的,并继续前行。

however I clicked on "add library" and moved on ..

现在,当我修改活动 ActionBarActivity

public class MainActivity extends ActionBarActivity { ... }

在我mainActivity.java,它给我的错误(红线娄ActionBarActivity和所有方法的名字和某些功能)..而当我再次更改:

in my mainActivity.java , it gives me error (a red line bellow the ActionBarActivity and all methods' names and some functions) .. and again when i change:

<activity android:theme="@style/Theme.AppCompat.Light" ... >

在清单中,它也给了我一个错误说:没有资源的发现,匹配给定的名字 ..

我完全失去了..我做了什么错?

I am totally lost .. what did I do wrong ?

推荐答案

这听起来并不像你输入正确的尤其是当你说该库在点添加库到应用程序的项目:我觉得失去了..主要是因为我没有本身有添加选项。但是我点击添加库,并继续前行。

It does not sound like you imported the library right especially when you say at the point Add the library to your application project: I felt lost .. basically because I don't have the "add" option by itself .. however I clicked on "add library" and moved on ..

在Eclipse中,你需要为右键单击该项目,转到属性,选择安卓列表中,则添加可添加库

in eclipse you need to right click on the project, go to Properties, select Android in the list then Add to add the library

按照本教程中的文档

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

这篇关于ActionBarActivity:不能被解析为一个类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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