Closed broodroosterdev closed 4 years ago
You shouldn't specify flavour when running flutter run, the flutter tool already uses it automatically
When testing this on my machine i get the following output:
broodrooster@pop-os:~/Projects/PotatoNotes$ flutter run
Launching lib/main.dart on Redmi Note 7 in debug mode...
Note: /home/broodrooster/.pub-cache/git/loggy-c9a5bc905ee42940f02b6e09fb422e8fa5a01432/android/src/main/java/hrx/loggy/LoggyPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 122.3s (!)
Exception: Gradle build failed to produce an .apk file. It's likely that this
file was generated under /home/broodrooster/Projects/PotatoNotes/build, but the
tool couldn't find it.
broodrooster@pop-os:~/Projects/PotatoNotes$ flutter run --flavor dev
Launching lib/main.dart on Redmi Note 7 in debug mode...
Running Gradle task 'assembleDevDebug'...
Running Gradle task 'assembleDevDebug'... Done 11.8s
✓ Built build/app/outputs/flutter-apk/app-dev-debug.apk.
The compiler always picks the first flavour as the default one and I configured those to have the dev one as first flavour, so that line shouldn't be required
The building instruction has also been changed to avoid getting build errors