我的一门课的重构问题
我编写了一个程序,并将我的类 StatusListActivity 命名为“扩展 Activity”,并且是启动器和主类。我尝试通过将名称更改为其他名称来重构它,每当我尝试运行该应用程序时,它都会关闭,请您知道问题是什么。
i wrote a program and i named my class StatusListActivity
which extend Activity
and is the launcher and main class. I tried refactoring it by changing the name to something else and whenever i tried to run the application, it closes please do you have an idea of what the problem was.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我猜你正在为 Android 开发?在这种情况下,您可能已更改默认启动器活动,您必须在项目的部署选项中重置该活动。
另外,您必须注意,通过简单地重命名函数,您并没有更改代码本身的任何引用。为此,您必须使用适当的重构功能,例如 Eclipse 在“重构”菜单中提供的功能。
I guess you are developing for Android? In that case, you might have changed the default launcher activity, which you have to reset in the deployment options of your project.
Also, you have to be aware, that by simply renaming a function, you have not changed any references on the code itself. For that, you have to use a proper refactoring-function as e.g. provided by Eclipse in the "Refactor"-Menu.
尝试更改 AndroidManifest.xml 文件中 Activity 类的名称
编辑< br>
另外,如果活动位于
com.example.myproject.activities.MyActivity
并在清单文件中
清单中的内容必须是
这对于必须位于 AndroidManifest.xml 中的所有其他类也是如此
Try to change the name of the Activity class in your AndroidManifest.xml file
<activity android:name="activityNewName">
EDIT
Also if activity located in
com.example.myproject.activities.MyActivity
and in manifest file
<manifest package="com.example.myproject" ...>
than in manifest must be
<activity android:name=".activities.MyActivity">
this also true for all other classes that must be in AndroidManifest.xml