Installation



Installation StepsΥπ?ρχουν τ?σσερι? τρ?ποι για να χρησιμοποι?σετε το flutter και να δημιουργ?σετε εφαρμογ??Install Android Studio + Emulators – Αυτ? ε?ναι η πιο ε?κολη εγκατ?σταση αλλ? ε?ναι πολ? πιθαν? ο υπολογιστ?? σα? να ζορ?ζεται να τρ?ξει το android studioInstall VS Code + emulator ΧΩΡΙΣ Android Studio – Το VS Code ε?ναι πιο ελαφρ? πρ?γραμμα αλλ? θα πρ?πει να ασχοληθε?τε με την ρ?θμιση του emulator μ?νοι σα?. Σα? ?χω β?λει αναλυτικ? β?ματα που μπορε?τε να εγκαταστ?σετε τον emulator.Install Android Studio + VS Code – Μπορε?τε να κ?νετε εγκατ?σταση του Android Studio ?στε να ?χετε τα Android SDK/Emulators κτλ. και να γρ?φετε κ?δικα στον VS Code αλλ? να χρησιμοποι?σετε του? emulator του Android Studio (Σε αυτ? την περ?πτωση μπορε?τε μ?σα απ? το VS Code να κατεβ?σετε το Plugin Android-iOS emulator)Install VS Code και σ?νδεση του κινητο? σα?. Σε αυτ? την περ?πτωση απλ? εγκαθιστ?τε το VS Code και συνδ?εται το κινητ? σα? μ?σω καλωδ?ου ?στε να τρ?χει το πρ?γραμμα σα? επιτ?που στο κινητ?.INSTALL FLUTTER (Απαρα?τητο ε?τε εγκαταστ?σετε Android Studio ε?τε VS Code)Configure the Flutter SDKDownload the .zip file of the Flutter SDK.Extract the .zip file in C disk. C:\flutter.Press Windows key and in the search bar type variable.Select Edit the system environment variables.Click on Environment Variables.In System variables select the Path variable and then click on Edit.Click on New and paste the path of bin folder of Flutter:C:\flutter\binNow click on Ok in the 3 windows to save changes.Install VS Code + Emulator (ΧΩΡΙΣ Android Studio)Install Java for Windows 10 JRE : : .Αν?λογα το path που ?χει εγκατασταθε? η java (KAI ΣΥΓΚΕΚΡΙΜΕΝΑ ΤΟ JDK) στον υπολογιστ? σα?Ανο?ξτε το Command Prompt (Win+R, type?cmd?and press Enter). Για εμ?να το Path του JDK ε?ναι?C:\Program Files\Java\jdk1.8.0_251. Γρ?ψτε την εντολ?:setx JAVA_HOME "C:\Program Files\Java\jdk1.8.0_251"?λλο? τρ?πο?:Start -> Edit the system environment variables -> Environment variables... -> New...Install HAXMΑνο?γουμε ?να cmd και τρ?χουμε “ bcdedit /set hypervisorlaunchtype off “ για να απενεργοποι?σουμε το virtualization. Download link: ΠΡΟΣΟΧΗ: ΟΧΙ το checktools το ΗΑΧΜ Κ?νουμε unzip και τρ?χουμε το haxm_7.6.5-setup.exeΚ?νουμε απλ? install και επανεκκ?νηση τον υπολογιστ?.Install Android SDKDownload?Command-Line-Tools ( ): Στην σελ?δα Downloads , στο κ?τω μ?ρο? κατεβ?στε το "Command line tools only".Αποσυμπι?στε το zip με 7-zip και συγκεκριμ?να τον φ?κελο “cmdline-tools” Πηγα?νετε στο AppData\Local:“C:\Users\το_ονομα_χρηστη_σα?\AppData\Local ” Φτι?ξτε ?να φ?κελο “Android” και μ?σα σε αυτ?ν ?να φ?κελο cmdline-tools, μετ? μ?σα στον φ?κελο cmdline-tools φτι?ξτε ?να φ?κελο “tools”mkdir Android\cmdline-toolscd Android\cmdline-toolsmkdir toolsΜ?σα στον φ?κελο tools βαλτ? ΟΛΑ τα αρχε?α που κ?νατε extract απ? το zip. Η δομ? των φακ?λων θα πρ?πει να ε?ναι ?τσι:├── cmdline-tools?? └── tools?? ├── bin?? ├── lib?? ├── NOTICE.txt?? └── source.properties Ορ?στε τι? μεταβλητ?? σα? μ?σω του variables των windows (μην ξεχ?σετε να β?λετε το δικ? σα? USERNAME στο path:ANDROID_HOME : C:\Users\your_username\AppData\Local\AndroidANDROID_SDK_ROOT: C:\Users\your_username\AppData\Local\Android\cmdline-tools\toolsTo path πρ?πει να εμπερι?χει αυτ?:Path(θα τα βαλετε ολα αυτα που γραφω): C:\flutter\binC:\Users\your_username\AppData\Local\Android\cmdline-tools\tools\binC:\Users\your_username\AppData\Local\Android\C:\Users\your_username\AppData\Local\Android\cmdline-tools\toolsΚ?νουμε restart το cmd.Π?με στο path C:\Users\your_username\AppData\Local\AndroidΤρ?χουμε την εντολ?:sdkmanager --listΠρ?πει να μα? βγ?λει μια λ?στα με ?λα τα androidΠρ?πει να εγκαταστ?σουμε τα πακ?τα platform-tools,?platforms;android-*?and?system-images;android-*;google_apis;x86_64Τρ?χουμε την εντολ?:sdkmanager "platforms;android-29" "system-images;android-29;google_apis;x86_64" "platform-tools"Επ?μενο β?μα:sdkmanager --licensesπατ?με σε ?λα “y”Εγκαθιστο?με το build-tools;29.0.3sdkmanager "build-tools;29.0.3"Φτι?χνουμε τον emulator:avdmanager create avd -n test_avd_29 -k "system-images;android-29;google_apis;x86_64"Για να βλ?πουμε την λ?στα απ? του? emulators καλο?με:avdmanager list avdπ?με στο C:\Users\your_username\AppData\Local\Android\emulator και ξεκιν?με τον emulatorcd emulatoremulator -avd test_avd_29Αυτ?? θα ε?ναι ο emulator που θα καλο?με μ?σω VS Code και Flutter:Install Visual Studio CodeDownload Visual Studio Code.Install it, the default configuration is more than enough.Install the extension of Flutter on Visual Studio CodeOpen Visual Studio Code.Click on the Extensions or Ctrl+Shift+X.In the search bar type flutter.Select Flutter by the Author Dart Code.Click on Install.Click on Reload.?λεγχο? εγκατ?σταση? Επιλ?γουμε view- Command PaletteΓρ?φουμε Flutter: Run Flutter DoctorΑν ?χουμε κ?ποια προβλ?ματα στην εγκατ?σταση θα φανο?ν εδ?Create Flutter App using Visual Studio CodeOpen the command palette in View > Command Palette or F1 or Ctrl+Shift+P.In the search bar type flutter.Select with the arrow keys on the keyboard Flutter: New Project and press Enter.Enter the name of the Flutter project.Select the folder to create Flutter project.The project folder will be opened and all the necessary files and folders will be created.Install Android StudioDownload Android Studio.Run the installer.Click on Next.Mark all the boxes and click on Next 2 more times.Click on Install.When finished, click on Next and then click on Finish.Now select Do not import settings and click on OK.It will open Android Studio Setup Wizard.Click on Next.Select Custom and again click on Next.Select the theme editor (I recommend Darcula) and click on Next.Now download the Android SDK, to do this check all the check boxes.Click on the button that has 3 points “…”.The file browser will open.Select the folder of your windows username, inside create a folder called Android and inside this a folder called SDK, and then select the folder SDK and click on OK. C:\Users\<YOUR_WINDOWS_USERNAME>\Android\SDKNow click on Next 2 times and then click on Finish.When the download is finished, click on Finish and Android Studio will open.Install the Flutter Plugin on Android StudioIn the window Welcome to Android Studio click on Configure and then on Plugins.In the search bar type in flutter and click on Search in repositories.Click on the one that says Flutter, Then click on Install, Accept and Yes.Now click on Restart Android Studio, then on OK, and on Restart.Android Studio will open again.Add the Android SDK to FlutterAgain open the Environment variables.And in the System variables click on New.In Variable name type ANDROID_HOME.Click on Browse directory and select the path to download the Android SDK:C:\Users\<YOUR_WINDOWS_USERNAME>\Android\SDKNow click on Ok in the 3 windows to save changes.Press the Windows key and in the search bar type cmd and select the Command Prompt.Type the command flutter doctor and press Enter.You will notice that you need to accept Android licenses, so type the following command and press Enter:flutter doctor --android-licensesNow you will be asked if you agree each license, in which you must type Y and press Enter for each license.When you have accepted all the licenses you will get All SDK package licenses accepted and close the Command Prompt.Create Flutter App using Android StudioIn the Welcome to Android Studio window click on Start a new Flutter Project.Select Flutter Application and click on Next, it will open Configure the new Flutter application.In Project name enter the name of the project, which should go in the lowercase_with_underscores.In Flutter SDK path enter C:\flutter.In Project location enter the location where you want to create the project.In Description enter a brief description of the project.Now click on Next, and it will open Set the package name.In Company’s domain enter a domain of yours or any unique identifier you want, which will be used to generate the Package name.The Package name will be auto-generated with the Project name and the Company’s domain, which is used to identify your app in the Play Store, although if you do not like it auto-genre you can edit it.In Platform channel language choose if you want your app Flutter support Kotlin for the Android code and Swift for the iOS code, in case you want to also code native code for each platform.Click on Finish and it will create all the folders and files of your project Flutter.Create an Android Emulator on Android StudioIn Android Studio, click on Tools > AVD Manager.Now click on Create Virtual Device.Select a Nexus 5 and click on Next.Select the system image that you downloaded with your Android SDK**, i**n my case it was Pie – 28 – x86 – Android 9.0, and then click on Next.Click on Finish.Now click on the button Run to run the Android Emulator and closes the window.Run Flutter App on an Android Emulator from Android StudioIn the toolbar at the side of main.dart click the button Run to run the app on the emulator. The first time it runs it will take a little bit.It will show the Flutter App on the emulator, which shows how many times you press a button.Now close Android Studio and continue with the next step.Πιθαν? errorAndroid licenses errorflutter doctor --android-licensesΔ?χεστε ?λε? τι? εγκαταστ?σει? με το να πατ?σετε “Y”Could not find a flutter SDKΑναζ?τηση στα windows environment variablesEdit the system environment variablesClick on Environment VariablesIn System variables select the Path variable and then click on EditClick on New and paste the path of bin folder of Flutter: C:\flutter\binClick okΑν δεν υπ?ρχει κ?τι στο C:\flutter\bin κατεβ?ζετε το flutter sdk στον φ?κελο ( )Unable to locate Android SDKΜ?σα στο vscode ανο?γουμε το terminal και γρ?φουμεflutter config --android-sdk " C:\Users\your_username\AppData\Local\Android"?τι δεν υπ?ρχει το ΗΑΧΜ Πηγα?νετε παραπ?νω στο “Install HAXM”JAVA Errors:Uninstall το jdk που εχετε απ? το control panel και reinstall το JDK 1.8:Βαλτε το σωστο PATH στο system environment variables για το JAVA_HOME (να δειχνει δηλαδη στο JDK1.8 path) ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download