[test_instalasi_flutter] flutter create --template app --overwrite .
Cannot create a project within the Flutter SDK. Target directory
'C:\src\flutter\test_instalasi_flutter' is within the Flutter SDK at
'C:\src\flutter'. exit code 2
hi! i'm newbie, please help me.
when creating a new Flutter in visual studio code, the library folder doesn't show up. But when I create a new Dart library it exists and appears, how do you flutter it ?. thank you
Just change your directory different than the FLUTTER SDK directory (don't use this: C:\src\flutter)
Just change the location where you're saving the project( Save it to a new directory) and you'
I've built an app with Android Studio and Flutter and wanted to generate a signed APK.
When I go to Tools->Flutter->Open Android module in Android Studio, it starts to build the project.
But after some time I get this Error and I don't know how to change the roots or what to do.
It seems like the problem are just two packages (url_launcher and shared preferences)
My Project is on my hard disk F:
and the flutter folder is on my hard disk C:
Error Message "Could not create task..."
Is this maybe because my project is on F: and the flutter folder with the packages in C: ?
How can I change the flutter folder to F: ?
I fixed mine by moving the project directory to the same drive. My project was stored in E:\ so, I moved it to C:.
My answer is almost the same as rvr93's answer but I did not add anything to the environment variables.
Create a directory in the same drive as your project and add PUB_CACHE environment variable. Run flutter pub get.
This worked for me.
I had your same issue, Gradle couldn't sync the android module, I solved it by deleting the android/ directory from the Flutter project, then recreate it using the command flutter create --platforms android .
Notice the "." at the end of the command it's part of it, it means create the Android project in the current directory.
As a workaround, you can do the following steps -
run flutter clean
do the Gradle sync without flutter pub get and make necessary changes to
native android code.
do pub get and run the app.
I have the same issue,
it seems the flutter project and the SDKs are in different prtitions of the hard disk
just go to the project root and run flutter clean
then go to the android folder and delete the .gradle folder
then back to the project root and run flutter pub get
and rebuild the app
As a workaround, you can do the following steps :
Open a terminal.
Run flutter clean.
Do the Gradle sync without flutter pub get and make necessary changes to native Android code or click on try again.
Do flutter pub get and run the app.
You will see that the SHA1 has been generated.
I faced the same issue in my android project after upgrading gradle.
My project was in my D drive, and I had set the destination folder for the generated apk in my desktop, which is in C drive. I changed the destination folder to a folder in D drive, and the issue got resolved.
I was facing the same issue all I did was to go build.gradle file in android folder and then change the following code as follows
dependencies {
//CHANGE THE Version in YOUR BUILD.GRADLE FILE
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
This is a temporary solution - track status here
I have a Flutter project that currently builds for iOS and Android. I created the project around Flutter v1.9 or so. Since creating the project, I have added flavor support to my project (dev, prod) via the guide found here
However, after having done this, it doesn't seem like I am able to add web support to my project. Following Flutter's official instructions to enable web for a pre-existing project, I try to run flutter create . in the root directory of the project. When I do this I get the output:
The Xcode project defines schemes: dev, prod You must specify a --flavor option to select one of the available schemes.
So I try to run: flutter create . --flavor=dev and get Multiple output directories specified. Try moving --flavor=dev to be immediately following create
Soooo, I try: flutter create --flavor=dev . and get Could not find an option named "flavor".
Does anyone know how I can initialize web for this project? Thanks.
You need to do the following:
Goto root folder and rename manually ios folder temporarily to something like ios1
Goto terminal and make sure you are standing in root, then run this line:
flutter create --platforms=web .
Return to project folder and rename back manually ios1 to ios
Done
I tried to install flutter, i followed excat steps in official docs. Installed SDK from github and added path to my bashrc file, As shown below picture, even though path successfully updated, flutter commands not recognizing and not working.
https://imgur.com/a/WfQ88J0
1
I recommend clearing the android-studio-dir and android-sdk settings, and let flutter automatically detects their path instead: This works for me .
flutter config --android-studio-dir=""
flutter config --android-sdk=""
This type of steps follws for flutter setup :
1)download latest version of v1.7.8+hotfix.4 this below link
https://flutter.dev/docs/development/tools/sdk/releases
2)my flutter store in this url : C:\src
3)set enviroment variable C:\src\flutter\bin
4)Android studio download and install.
5)install plugin flutter & dart...in android studio...than after restart IDE.
6) than after i have to start a new flutter project
-flutter_demo (project name)
-C:\src\flutter (SDK path)
-C:\src\flutter_project (project location)
my issue is this when i have to create new flutter project only create blank folder in this location [[C:\src\flutter_project]] no any other process.
what is my issue??? i need to help???
this step follow another PC in window 7
--work properly
-but in my pc not working.
-my pc os is also window 7
I also faced with the same problem about creating flutter blank project. In my case, I check the installation steps and all are correct.
The answer is in User Environment Variable Path, there is also old flutter/bin path that I had tested before.
I deleted the old flutter bin path and also in System Environment Variable Path. Then, I can create flutter project and run futter doctor successfully.