mmoghrabi
mmoghrabi

Reputation: 1291

How can I change the package name programmatically in Android?

I was thinking about accessing the Manifest file from activity ,and change the package name, is there any way to achieve that? or any other way to refactor the package name programmatically?

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.refactoring"
android:versionCode="1"
android:versionName="1.0" >

Upvotes: 0

Views: 411

Answers (2)

Sandeep Dhull
Sandeep Dhull

Reputation: 1648

In simple terms Not possible.. actually by the way.. package name represents the class folder structure..

Upvotes: 0

CommonsWare
CommonsWare

Reputation: 1007339

This is not possible. You can change it at compile time, by editing the manifest file, but you cannot change it at runtime.

Upvotes: 2

Related Questions