Android:扩展自定义抽象 Activity
我创建了一个抽象 Activity,它扩展了 android.app.Activity。然后我创建了一项活动来扩展我的抽象活动。 [1]
ant 一切都很好,但是 Eclipse 在清单中显示错误,说我的 activiy 不存在,所以我重新生成类文件,清单中的错误消失了。但现在 Eclipse 在我的项目根目录显示错误并且不想编译。
我准确地说,该活动在使用 ant 构建的设备中运行良好。我也尝试“修复项目属性”。我无法声明抽象活动,因为它是抽象的。
有人已经看到这个错误了吗?
谢谢
[1] 这是一个小示意图
android.app.Activity ->摘要 ActivityNet ->我的活动
I created an abstract Activity which extends the android.app.Activity. Then I created an activity extending my abstract one. [1]
Everything is fine with ant, but eclipse showed an error in the manifest saying that my activiy did not exists, so I regenerate the class files and the error in the manifest is gone. But now eclipse shows an error at the root of my project and don't want to compile.
I precise that the activity is working fine in a device builded with ant. I tried to "Fix Project Properties" as well. I can't declare the abstract activity because of it's abstract.
Anybody already saw this bug ?
Thanks
[1] Here is a little schematic
android.app.Activity -> abstract ActivityNet -> MyActivity
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是 Eclipse 的常见错误/行为。
要消除它,请单击“问题”图标(右下角,但这取决于您的预期)
右键单击错误行,然后将其删除。
现在错误应该消失了
This is a common bug/behaviour of Eclipse.
To eliminate it click on the "Problems" icon (right bottom corner but it depends on your prospective)
Right click on the error line and then delete it.
The error should be gone away now