i开发者_如何学C 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.
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.
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
精彩评论