onatcipli / rename

The Rename CLI Tool is a utility designed to modify your Flutter project's AppName and BundleId across various platforms, such as iOS, Android, Macos, Linux, Windows and Web
https://pub.dev/packages/rename
MIT License
164 stars 39 forks source link

--bundleId does not change package name of the app. #11

Closed happy-san closed 3 years ago

happy-san commented 3 years ago

rename correctly changed the applicationId in the build.gradle file but it didn't change the package name in AndroidManifest.xml I'm new to app dev so I don't if package name is important or if it needs to be same as applicationId...

davidlahuta commented 3 years ago

Same issue here.

Is it even required?

SahajRana commented 3 years ago

Has this probelm fixed?

I tried to change bundle Id in Android

It gives me

> No matching client found for package name 'com.example.android_app'

where the log gives

┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ #0   FileRepository.changeAndroidBundleId (package:rename/file_repository.dart:119:12)
│ #1   <asynchronous suspension>
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
│ 💡 Android bundleId changed successfully to : com.example.android_app
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
happy-san commented 3 years ago

For future reference.

One more thing to know: Although you may have a different name for the manifest package and the Gradle applicationId, the build tools copy the application ID into your APK's final manifest file at the end of the build. So if you inspect your AndroidManifest.xml file after a build, don't be surprised that the package attribute has changed. The package attribute is where Google Play Store and the Android platform actually look to identify your app; so once the build has made use of the original value (to namespace the R class and resolve manifest class names), it discards that value and replaces it with the application ID.

So I believe that changing only the applicationId is enough.