0

So I want to upload an app on Google Play, so I build an .aab file with the key and want to upload this one as the first Release. Google says that my file uses the package 'com.example' and this isn't allowed. So I want to test the .aab file but wasn't successful. But I think the file isn't working as it should, becuase I couldn't find anything named 'com.example' in the whole project. Not in the pubspec.yaml, not in the main, not even in the AndroidManifest.xml. So my question is, what does it mean, when it says I#m using the 'com.example' package and does it mean that my .aab file wasn't builded correctly?

I built the .aab file from my project in AndroidStudio. Afterwards I want to upload the file on Google Play, but there it says something like the package 'com.example' couldn't be used.

  • Check out the following SO question on how to change the package name: [Changing package name in Android Studio](https://stackoverflow.com/questions/16804093/rename-package-in-android-studio) – Dinux Aug 15 '23 at 08:59

2 Answers2

0

So the solution was really easy. In the build.gradle file you search for the defaultConfig block and there you change the applicationId in whatever package you want. But you can't change the namespace in the android block.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 16 '23 at 11:32
-1

Please read and follow this guide: https://docs.flutter.dev/deployment/android

You can skip: Shrinking your code with R8, Enabling multidex support

As for com.example you can try using global search in VScode to find where you missed renaming this name.

Paul Grei
  • 369
  • 2
  • 12
  • So, I found the com.example in my build.gradle, but there I couldn't change the name. It's in applicationId "com.example.projectname" and in namespace "com.example.projectname". I've tried to change the name, but then the app wasn't running. So how can I change this? – trukeOderSo Aug 14 '23 at 23:12