I want to use flutter for android development. I already downloaded fluter sdk and put it in path, I already have android sdk and added it to environment variable, I even downloaded gradle. The problem is that I don't know how to tell flutter to use the gradle that I downloaded and have it local on my PC. Would anyone know how to fix this problem? Thanks.
[√] Flutter (Channel stable, v1.9.1+hotfix.4, on Microsoft Windows [Version 10.0.18362.30], locale es-ES)
• Flutter version 1.9.1+hotfix.4 at E:\flutter
• Framework revision cc949a8e8b (5 months ago), 2019-09-27 15:04:59 -0700 >• Engine revision b863200c37 >• Dart version 2.5.0
\CreateProcessW failed 740
CreateProcessW failed 740
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
• Android SDK at E:\AndroidSDK
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.0
• ANDROID_HOME = E:\AndroidSDK
• Java binary at: C:\Program Files\Java\jdk1.9.0\bin\java X Could not determine java version [!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.dev/setup/#android-setup for detailed instructions).
[√] VS Code (version 1.42.1)
• VS Code at C:\Users\Alejo\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.8.1
[√] Connected device (1 available)
• SM A305G • R58M84Q30VV • android-arm64 • Android 9 (API 28) ! Doctor found issues in 2 categories.
Hello AGHA, your error is due to the fact that you do not have android studio installed, unfortunately you have to download it so you are not going to use it, since the IDE comes with the android sdk by default, in addition to the licenses, try installing it and downloading the plugin from flutter, also after installed run the command flutter doctor --android-licenses to everything you give Y.
This is the solution I found to install flutter offline (or at least a part of it) (I mean having all these tools and moving them to another PC).
After having all this you can create more offline flutter projects (using the --offline flag). I recommend using Android Studio because most of the actions try to do them offline using the caches. For packages in pub.dev, they can be downloaded and referenced in the pubspec.yaml with the path attribute or simply by saving the package to the .pub-cache folder.
Note. I haven't tried but if you have a flutter sdk with most of the steps (basic dependencies) already cached it would theoretically work to copy that flutter sdk to another PC.