Pregunta

The Situation:

  • I decided to change my app's name, so I changed the package name, the strings.xml, and the manifest file.

  • also I searched and replaced it in all the project's files.

  • but when I launch the app on eclipse I get "Launching OldAppName" pm the bottom right corner.

The First Offers: people here offered me things I already tried

My Failed Attempts: I tried copying the files (in res, src) to a new project, but that didn't help

My Succesful Attemps: I copied the entire directory, and opened it in another computer, and then it showed the right name

My Remaining Question: where could that value be? and why does it still show it there?

¿Fue útil?

Solución 2

Finally!! found the file responsible

there was a file called OldAppName.launch

it is located in workspace/.metadata/.plugins/org.eclipse.debug.core/.launches

also stuff on:

/home/amir/workspace/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings

might be connected

thanks to the guys who tried helping, hope this will help somebody else :)

Otros consejos

I solved it like this:

Eclipse -> Project -> Properties -> Run/Debug Settings,

in the window, select the "Launch configuration" for your project, if it has a wrong name, delete it.

Next time you launch your project, the Eclipse will ask whether to launch it as an Android Application or something else. Choose "Android Application".

--> a new launch configuration with the correct name will be created.

Just to add my two cents.

Your dealing with the name of the debug configuration. Click the arrow near the debug button and select "Debug Config". Select the outstanding configuration and at the very top of the dialogue you can rename the configuration, or you can delete it and make a new one.

I would suggest this rather than deleting Eclipses configuration file directly.

Just change value of app_name in string.xml file and then right click on project folder and rename it, that's all

Go to res -> values -> strings.xml -> appname, change name of the app there.

No go to Android Manifest and check if it looks like this:

<application

    android:label="@string/app_name" 
    .......................
>

If android:label="@string/app_name" is changed to android:label="MyApp", than change it to one shown above. Your problem should be solved.

The most effective way to solve this is to

Run --> Run Configurations

i am adding snapshot of it

enter image description here

i have added string to explain. You just need to give your desired name. it will create new newAppName.launch inside workspace/.metadata/.plugins/org.eclipse.debug.core/.launches

Reference : http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftasks-java-local-configuration.htm

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top