How to clone Flutter Gallery project in my Android Studio? - android-studio

Link: https://github.com/flutter/flutter/tree/master/examples/flutter_gallery
but when I try to test before clone, it's showing "repository test failed"
but my git is installed in my Kali Linux and also I previously so many times clone projects, but I think this flutter gallery is not correct to clone!

if you installed flutter then you have it at <flutter_install_path>/examples/flutter_gallery

Another way is just to download it from the github website
First go to the root of the project which i think is this=> https://github.com/flutter/flutter
click on the clone or download button and download the zip version of the project
extract it, on your computer
Now use your IDE to open it

For me and after 3 days of searching and testing:
Download the flutter SDK manually from here
Then open android studio -> configuration -> setting -> languages & Frameworks -> flutter:
locate Flutter SDK path to the source you just downloaded
Then click apply

Related

Flutter create command was unsuccessful

I'm creating a new flutter project in Android studio for the first time. I give the project a name and choose Flutter sdk. I then clicked finish and then noting happened. Android studio says that
"Flutter create command was unsuccessful"
When I navigate to command directory using file explorer, I new folder is created with the project name I've given but it is empty.
Please help.
I don't think you installed flutter correctly. First and foremost, make sure you run flutter doctor from your terminal.
If it doesn't work then you didn't install flutter properly.
If it works, try creating your project via terminal by typing flutter create projectname
I hade the same issue in ubuntu
first, check flutter doctor and solve the error if there was
then check the git installation
in my case, I didn't install git
On Windows at least you need to add <flutter_dir>\bin to your path, and then restart Android Studio. It is not clear to me why Android Studio needs to know the location of the Flutter SDK if it doesn't then use that information but... :shrug:
Git also needs to be in the PATH too (as C:\Program Files\Git\cmd); I have always used git-bash just fine without that but now it seems to be a requirement that isn't clearly surfaced when upgrading.
In My case set the flutter sdk path first while create the app and then create the app

ios/mac - Android Studio: Flutter SDK path doesnt set

Steps to Reproduce:
1. Open Android Studio IDE on Mac (Flutter plugin already installed)
2. Android Studio > Preferences.. > Language & Frameworks > Flutter
3. Section SDK: Set Flutter SDK path
4: Press Apply
Expected:
Path should be set and remain in the text box
Actual:
Path disappears from Flutter SDK path text box, no path is set and cant go on programming
As I work on a group project, i regulary have to pull from github. After every pull, i had to reset the Flutter SDK path (dont really know why but it kept disappearing). It used to work just fine until some days ago, the behavior explained on top started. Any help would be really appreciated!
Video: http://sendvid.com/vlt9ykpz
If someone else has the same problem: Deleting the local copy and pulling the whole project from git again fixed the issue in my case. Just dont forget to copy your local changes as the would be deleted aswell
I ran into this while moving the location of the Flutter SDK.
After all the files were in place, restarting the IDE showed the correct path after it had been disappearing before restart.
C:\dev\tools\flutter_sdk\flutter (folder that contains flutter\bin)
Don't commit the android/local.properties file (add it to .gitignore)
or update the path using flutter config --android-sdk path after checkout.
having the same issue on ubuntu 20, installed flutter with snapd

Flutter create command was unsuccessful error

I'm creating a new flutter project in Android studio. I give the project a name and choose Flutter application. I then clicked finish and then nothing happened.
Android studio says that
"Flutter create command was unsuccessful"
When I navigate to command directory using file explorer, a new folder is created with the project name I've given but it is empty.
Please help.
A simple Android Studio restart did the trick for me
I've solution to this problem now.
After running flutter doctor --android-licenses I got to know that I need to update my sdkManager.
Then I went to that directory using
cd C:\Users\[user-name]\AppData\Local\Android\Sdk\tools\bin
and run sdkmanager --update
Then I restarted the Android Studio and tried creating flutter project.
It worked.
check your FLUTTER SDK path of the project (android studio: file -> settings -> Language & framework -> flutter -> flutter sdk path) . Or execute flutter doctor command in flutter consol.(This worked for me)
please install all the dependencies that flutter wants
Operating Systems: Linux (64-bit)
Disk Space: 600 MB (does not include disk space for IDE/tools).
Tools: Flutter depends on these command-line tools being available in your environment.
*bash
*curl
*file
*git 2.x
*mkdir
*rm
*unzip
*which
*xz-utils
*zip
Shared libraries: Flutter *test command depends on this library being available in your environment.
libGLU.so.1 - provided by mesa packages such as libglu1-mesa on Ubuntu/Debian and mesa-libGLU on Fedora
Look at Flutter sdk path while Creating the Project.
$ C:\flutter
If your Flutter SDK is updated and the path is right you will get a solution.
Check your Flutter SDK path.
Check the package name. It must be in lower case.
Restart your IDE and check again.

Flutter: How to import existing Flutter project, as a gradle project

How to import existing Flutter project, as a gradle project? 'Import Project' wizard asking for Gradle home path.
I have gradle, installed in my system. But what (which path) needs to set here.
Here is, what I'm trying:
Error
I had also gone through this problem where I have to import the existing Flutter project in Android Studio. I was able to import the project following below steps:
Open Android Studio
Goto File -> Open -> In Open File or Project window select the project you want to import.
Once you have done above steps try to resolve warnings shown in the log window. Warnings may be like update dependencies used in the project, etc.
Hope it will help you out.
I faced the same issue.
The gradle home directory (on my Windows machine) is located under:
C:\Program Files\Android\Android Studio\gradle\gradle-4.1
(please check the gradle version).
This will allow you to open the project. Then, you will most certainly need to "upgrade to gradle".
If this does not fully work, you might also consider using Visual Studio Code, which makes the "import" much easier: simply open the folder where you project resides. Optionally, you will have to resolve missing packages (-> Fetch packages). It should then be possible to run the project.
Hope this helps.
File - Open - Select the project root directory
Open Flutter settings from the tip menu - Click the pull-down menu, then flutter sdk dir appeared
Run
Or you can just use the flutter run command after step 1.
If you first add the flutter plugin for Android studio, then you can directly import the project as an Android Studio project and it should work fine.
In my case, having Android Studio 3.4.2 and Flutter 1.7.8, I only needed to:
1 - Open the project with the option "Open an existing Android Studio project".
2 - Run "flutter pub get" to get the packages listed in the pubspec.yaml file.
3 - Run the project with "flutter run"
If you are using Google services, don't forget to add your google-services.json file in your project. In another case, the project will fail without a clear message when you try to run it.
For Import exiting Flutter project.
Please choose Import Project because of Android Native application mean import use of android app only.
So use File -> Open -> Select Project root directory.
After open if ask for dependencies then Choose to Get dependencies

Android studio isn't starting

I have installed an Android studio from here. It worked, i wrote a hello world project and then closed it. But the IDE does not start second time. It gives me an error "caches are locked".
I installed unlocker and it says that no process blocks this folder. Does anybody know where is the problem? Thanks in advance.
I also faced this problem. I have solve my problem as follows:
Go to folder where android-studio is installed. (C:\Program Files (x86)\Android\android-studio)
Now go back to previous folder. (C:\Program Files (x86)\Android)
Right click on the android-studio folder and go to properties.
Now in Properties window, go to Security Tab.
Click the Edit Button
Now, a new window will open, here you click the Users(your-username-or-your-group-name)
Now, from the List below, Check "Allow" in front of "Full control"
Now press "OK", then again "OK"..
Its done.. Now you can use Android Studio easily instead of Running it As Administrator every time..
For details please visit this page
If you're like me, you could be trying to start a version prior to 0.2.0 (in my case 0.1.6)
Following Google's notes here: http://developer.android.com/sdk/installing/studio.html
You'll need to remove and re-install Android Studio 0.2.0 & up
"Note: There is not a patch update available from 0.1.9 to 0.2. To update from Android Studio 0.1.x to 0.2.x, you must install a new Android Studio bundle from this page. The reason for that is that we have made changes to the bundled SDK such that it includes a pre-configured local Maven repository which can serve up the v4 support library and which is required for creating new projects."
Also be aware that if you have your Android SDK files stored here:
C:\Program Files (x86)\Android\android-studio\sdk
You should move them before the uninstall or you'll need to download the SDK files again.
After the un-install and re-install now working on my Windows 7 64-bit system

Resources