添加一个新类的Andr​​oid项目 [英] Adding a new class to Android Project

查看:132
本文介绍了添加一个新类的Andr​​oid项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个长期的时间窗开发商希望学习一些关于Android编程。我通过萨姆斯书工作我的方式教自己在24小时内的Andr​​oid应用程序编程。我发现有些瑕疵的书,但已经没有什么,我想不出我自己,直到现在。我正在添加第二个类,我的项目,并在新的Java Class对话框,它说点击旁边的超类中的浏览按钮,然后选择android.app.Activity。然而,显示的唯一的事情就是java.lang.Object继承。

I'm a long time windows developer looking to learn something about Android programming. I'm working my way through the Sams book Teach Yourself Android Application Programming in 24 hours. I've discovered some flaws with the book already but nothing that I couldn't figure out on my own, until now. I'm working on adding a second class to my project and in the New Java Class dialog, it says to click the Browse button next to the Superclass box and pick "android.app.Activity". However, the only thing shown is java.lang.Object.

我是pretty肯定的是,我已经设置正确的事情,但后来,也许我没有。

I'm pretty certain that I've set thing up correctly, but then, maybe I haven't.

谁能给我指点一下?

谢谢!

推荐答案

浏览按钮尝试基于什么是目前的超类文本框中做一个自动匹配。

The browse button tries to do an auto-match based on what is currently in the Superclass text box.

删除的java.lang.Object和输入法(例如),然后点击浏览,看看你会得到什么。 ; - )

Delete java.lang.Object and enter Act (for example) then click Browse and see what you get. ;-)

顺便说一句 - 我假设你正在使用Eclipse?如果是这样,确认并有人将重新标记了一个问题,它更一个Eclipse使用的问题,而不是具体的Andr​​oid

BTW - I'm assuming you're using Eclipse? If so, confirm and someone will retag the question as it's more of an Eclipse usage question rather than Android specific.

这篇关于添加一个新类的Andr​​oid项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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