Java – How to remove the upper directory from the package name

How to remove the upper directory from the package name… here is a solution to the problem.

How to remove the upper directory from the package name

I know how to rename package name in Android studio. I do this every time, and it’s easy to do in Android Studio. But now I’m stuck in the following situation

My package name

com.example.andygreson.talkmania

I want to be where

com.andygreson.talkmania

I want to remove the example directory from the package name. But when I do this, it deletes all the items in it.

Please tell me how

Solution

In AndroidStudio

Back up your com.example.andygreson.talkmania package
And then
Create the new package you want com.andygreson.talkmania Now copy all the files from the previous package and paste them into this package.

Don’t forget to change in the AndroidManifest file

Refresh the studio. Done.

Related Problems and Solutions