1
votes

I created a project using following command on windows environment

flutter create --org in.myorg helloworld

Project is created successfully

Flutter version is as below Flutter 1.9.1+hotfix.5 • channel stable • https://github.com/flutter/flutter.git Framework • revision 1aedbb1835 (3 weeks ago) • 2019-10-17 08:37:27 -0700 Engine • revision b863200c37 Tools • Dart 2.5.0

When I run the code I get following error

e: D:\Project\test\helloworld\android\app\src\main\kotlin\in\myorg\helloworld\MainActivity.kt: (1, 9): Package name must be a '.'-separated identifier list

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> Compilation error. See log for more details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 12s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done                        13.5s
Gradle task assembleDebug failed with exit code 1

.in domains are not allowed in flutter? using an incorrect domain will face issue while publishing app?

1

1 Answers

1
votes

Yes, because in is one of Kotlin reserved keywords: keyword-reference

You can fix it by set Java as your Android platform language and not Kotlin. Also, I think that this word is also reserved for Swift language.

I'm not sure if you can switch it on the fly but you can recreate your project with: flutter create -i objc -a java command