flutter-intellij icon indicating copy to clipboard operation
flutter-intellij copied to clipboard

The package must have at least one '.' separator

Open PiN73 opened this issue 3 years ago • 1 comments

Currently the plugin disallows creating an app with Android package name like "myorg.myproject"

Steps to Reproduce

  • Open Android Studio with Flutter plugin installed
  • Click "New Flutter Project"
  • Input project name and organization of one word each, e.g "myproject" and "myorg"
  • An error will occur: The package must have at least one '.' separator

However:

  • Android allows it: must have at least two segments (one or more dots)
  • Native Android project in Android Studio can be created with such name
  • Flutter command-line tool also allows it: flutter create myproject --org myorg

Version info

Flutter 2.10.5 • channel stable • https://github.com/flutter/flutter.git Framework • revision 5464c5bac7 Engine • revision 57d3bac3dd Tools • Dart 2.16.2 • DevTools 2.9.2

Android Studio Bumblebee | 2021.1.1 Patch 3 Flutter plugin 67.1.1 Dart plugin 211.7817

PiN73 avatar May 10 '22 00:05 PiN73

Our validation rules are a copy of what Android Studio used in 2018. Apparently they changed the rules, and we need to fix ours to be compatible. See io.flutter.utils.AndroidUtils.validateAndroidPackageName().

stevemessick avatar May 10 '22 17:05 stevemessick