Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change default package from com.example for Eclipse Android projects

I am using Eclipse 4.2 with Android SDK.

I am wondering if it is possible to change the default package ID com.example that shows in the "New Android Application" wizard as you type the application name?

I would like it to default to my own package ID so that I don't need to correct the Package Name field each time.

Is this possible to do? Please explain how.

like image 825
gone Avatar asked Nov 21 '12 01:11

gone


2 Answers

For anyone coming here in 2020, the file you are looking for is other.xml It can be found in your AndroidStudio library under config/options/other.xml (For mac this is probably ~/Library/Application Support/Google/AndroidStudio4.1/options)

Then you can follow the instructions by @Murillo Comino

<property name = "SAVED_ANDROID_PACKAGE" value = "com.example" />

EDIT:

As per @Douglas Kazumi 's comment, it is important that AS will be closed while editing this.

like image 196
amitfr Avatar answered Oct 11 '22 07:10

amitfr


I'm not sure why so many people have right answers with wrong file location...

I've installed android studio 2020.3 with all default settings and the file others.xml is in folder

C:\Users\MYUSER\AppData\Roaming\Google\AndroidStudio2020.3\options
like image 29
Rafael Lima Avatar answered Oct 11 '22 06:10

Rafael Lima