Vous êtes sur la page 1sur 12

Comment créer un projet ?

Pour créer un projet Angular, vous devez d'abord ouvrir un terminal et naviguer
jusqu'au dossier où vous souhaitez créer votre projet. Une fois que vous êtes dans le
bon dossier, vous pouvez utiliser la commande ng new suivie du nom de votre projet
pour créer un nouveau projet Angular. Par exemple, si vous souhaitez créer un projet
nommé "mon-projet", vous pouvez utiliser la commande suivante :

ng new mon-projet

Cette commande va créer un nouveau dossier nommé "mon-projet" dans le dossier


courant, puis y télécharger et installer tous les fichiers et dépendances nécessaires à
un projet Angular. Cela peut prendre un certain temps, en fonction de la vitesse de
votre connexion internet.

Une fois que le projet a été créé, vous pouvez accéder au dossier du projet en
utilisant la commande cd mon-projet (remplacez "mon-projet" par le nom de votre
projet), puis lancer l'application en utilisant la commande ng serve . Cette commande
va lancer un serveur local sur votre ordinateur et ouvrir l'application dans votre
navigateur par défaut.

Vous pouvez maintenant commencer à travailler sur votre projet Angular en


modifiant les fichiers de code dans le dossier du projet. Chaque fois que vous
enregistrez un fichier, l'application sera automatiquement rechargée dans votre
navigateur, vous permettant de voir les modifications en temps réel.
Développer
Une fois que vous avez créé un projet Angular et lancé le serveur local en utilisant la
commande ng serve , vous pouvez accéder à l'application de développement en
ouvrant votre navigateur et en naviguant jusqu'à l'adresse http://localhost:4200 .
Cette adresse correspond au serveur local que vous avez lancé.

Si vous avez changé le port par défaut utilisé par ng serve , vous devrez utiliser
l'adresse correspondante dans votre navigateur pour accéder à l'application. Par
exemple, si vous avez utilisé la commande ng serve --port 4300 pour lancer le
serveur local sur le port 4300 , vous devrez accéder à l'application en utilisant
l'adresse http://localhost:4300 dans votre navigateur.

import tkinter

tkinter._test()

ReactJS est une bibliothèque JavaScript puissante spécialement conçue pour la construction d’interfaces
utilisateur. Elle a été développée par Jordan Walke, ingénieur logiciel chez Facebook, en 2013. Voici
comment installer ReactJS sur différents systèmes d’exploitation :
1. Windows:
o Installez Node.js et npm (Node Package Manager) sur votre machine.
o Ensuite, installez Create React App en utilisant la commande suivante dans votre terminal :
o npx create-react-app mon-projet-react
o Remplacez mon-projet-react par le nom de votre projet.
o Accédez au répertoire de votre projet :
o cd mon-projet-react
o Démarrez le serveur de développement avec la commande :
o npm start
2. macOS:
o Ouvrez le terminal et exécutez les commandes suivantes :
o cd ~
o curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh
o sudo bash nodesource_setup.sh
o Ensuite, installez Node.js et npm :
o sudo apt-get install -y nodejs
o Vous pouvez maintenant créer un nouveau projet React en utilisant create-react-app.
3. Linux (Ubuntu 20.04):
o Ouvrez le terminal et exécutez les commandes suivantes :
o cd ~
o curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh
o sudo bash nodesource_setup.sh
o Installez Node.js et npm :
o sudo apt-get install -y nodejs
o Créez un nouveau projet React :
o npx create-react-app mon-projet-react
o Accédez au répertoire du projet :
o cd mon-projet-react
o Démarrez le serveur de développement :
o npm start
En suivant ces étapes, vous serez prêt à développer des interfaces utilisateur

Pour installer React Native sur Windows, suivez ces étapes :


1. Installer les outils nécessaires :
o Visual Studio Code (ou l’éditeur de code de votre choix).
o Android Studio pour Windows. Assurez-vous d’installer le SDK Android 6.0
(Marshmallow) ou une version ultérieure1.
o Node.js : Installez NodeJS pour Windows. Vous pouvez également envisager d’utiliser Node
Version Manager (nvm) si vous prévoyez d’utiliser plusieurs projets et versions de
NodeJS. Pour les nouveaux projets, nous vous recommandons d’installer la dernière version
LTS12.
2. Configurer les variables d’environnement :
o Créez des chemins de variables d’environnement pour le SDK Java et le SDK Android :
 Dans le menu de recherche de Windows, entrez : “modifier les variables d’environnement
système” pour ouvrir la fenêtre Propriétés système.
 Choisissez Variables d’environnement, puis Nouvelle… sous Variables utilisateur.
 Entrez le nom et la valeur de la variable (chemin) :
 JAVA_HOME : C:\Program Files\Android\Android Studio\jre\bin
 ANDROID_HOME : C:\Users\username\AppData\Local\Android\Sdk
3. Créer un projet avec React Native :
o Utilisez npx, un outil d’exécution de package installé avec npm, pour créer un projet React
Native :
o npx react-native init MonProjetReactNative
o Remplacez MonProjetReactNative par le nom de votre projet.
o Vous pouvez également spécifier une version React Native spécifique avec l’argument --
version.
4. Vérifier l’installation :
o Dans votre terminal, exécutez la commande :
o react-native -v
o Si vous voyez la version de React Native, l’installation s’est bien déroulée2.

Vous êtes maintenant prêt à développer des applications mobiles avec React Native ! 🚀

Migrer à partir de XAMPP


Vous pouvez migrer de XAMPP vers Laragon facilement :

Copier le code
Copiez tous vos dossiers dans C:\xampp\htdocsC:\laragon\www
Copier des bases de données :
Videz toutes les bases de données de WAMP :
1. Démarrer XAMPP
2. Courir:
mysqldump.exe --all-databases > C:\laragon\tmp\alldb.sql
3. Arrêter XAMPP
Restaurez toutes les bases de données à Laragon :
1. Démarrer Laragon
2. Courir:
mysql -u root -p < C:\laragon\tmp\alldb.sql

Start building Flutter Android apps on Windows


1. Get started
2. Install
3. Windows
4. Make Android apps
error Important Perform this guide in sequence. Skipping steps can cause errors.
Verify system requirements
To install and run Flutter, your Windows environment must meet the following hardware and
software requirements.

Hardware requirements
Your Windows Flutter development environment must meet the following minimal hardware
requirements.

Requirement Minimum Recommen

x86_64 CPU Cores 4 8

Memory in GB 8 16

Display resolution in pixels WXGA (1366 x 768) FHD (1920 x

Free disk space in GB 11.0 60.0

Software requirements
To write and compile Flutter code for Android, you must have the following version of
Windows and the listed software packages.

Operating system
Flutter supports 64-bit version of Microsoft Windows 10 or later. These versions of Windows
should include the required Windows PowerShell 5.0 or later.

Development tools
Download and install the Windows version of the following packages:

 Git for Windows 2.27 or later to manage source code.


 Visual Studio 2022 with the the Desktop development with C++ workload or Build Tools for
Visual Studio 2022. This enables building Windows app including all of its default
components. Visual Studio is an IDE separate from Visual Studio Code.
 Android Studio 2023.1 (Hedgehog) to debug and compile Java or Kotlin code for Android.
Flutter requires the full version of Android Studio.
 The latest version of Google Chrome to debug JavaScript code for web apps.

The developers of the preceding software provide support for those products. To troubleshoot
installation issues, consult that product’s documentation.

When you run the current version of flutter doctor, it might list a different version of one
of these packages. If it does, install the version it recommends.

Configure a text editor or IDE


You can build apps with Flutter using any text editor or integrated development environment
(IDE) combined with Flutter’s command-line tools.

Using an IDE with a Flutter extension or plugin provides code completion, syntax
highlighting, widget editing assists, debugging, and other features.

Popular options include:

 Visual Studio Code 1.77 or later with the Flutter extension for VS Code.
 Android Studio 2023.1 (Hedgehog) or later with the Flutter plugin for IntelliJ.
 IntelliJ IDEA 2023.1 or later with the Flutter plugin for IntelliJ.

bolt The Flutter team recommends installing Visual Studio Code 1.77 or later and
the Flutter extension for VS Code. This combination simplifies installing the Flutter SDK.

Install the Flutter SDK


To install the Flutter SDK, you can use the VS Code Flutter extension or download and install
the Flutter bundle yourself.

 Use VS Code to install


 Download and install
Download then install Flutter
To install Flutter, download the Flutter SDK bundle from its archive, move the bundle to
where you want it stored, then extract the SDK.

1. Download the following installation bundle to get the latest stable release of the
Flutter SDK.

flutter_windows_3.19.4-stable.zip

For other release channels, and older builds, check out the SDK archive.

The Flutter SDK should download to the Windows default download


directory: %USERPROFILE%\Downloads.

If you changed the location of the Downloads directory, replace this path with that
path. To find your Downloads directory location, check out this Microsoft Community
post.

2. Create a folder where you can install Flutter.

Consider creating a directory at %USERPROFILE% (C:\Users\{username})


or %LOCALAPPDATA% (C:\Users\{username}\AppData\Local).

warning Warning
Don’t install Flutter to a directory or path that meets one or both of the following
conditions:

o The path contains special characters or spaces.


o The path requires elevated privileges.

As an example, C:\Program Files fails both conditions.


3. Extract the zip file into the directory you want to store the Flutter SDK.

content_copy
C:> Expand-Archive `
–Path $env:USERPROFILE\Downloads\flutter_windows_3.19.4-
stable.zip `
-Destination $env:USERPROFILE\dev\
When finished, the Flutter SDK should be in the C:\user\{username}\dev\
flutter directory.

Update your Windows PATH variable

helpHelp
To run Flutter commands in PowerShell, add Flutter to the PATH environment variable. This
section presumes that you installed the Flutter SDK in %USERPROFILE%\dev\flutter.
1. Press Windows + Pause.

If your keyboard lacks a Pause key, try Windows + Fn + B.

The System > About dialog displays.

2. Click Advanced System Settings > Advanced > Environment Variables…

The Environment Variables dialog displays.

3. In the User variables for (username) section, look for the Path entry.

a. If the entry exists, double-click on it.

The Edit Environment Variable dialog displays.

i. Double-click in an empty row.

ii. Type %USERPROFILE%\dev\flutter\bin.

iii. Click the %USERPROFILE%\dev\flutter\bin entry.

iv. Click Move Up until the Flutter entry sits at the top of the list.

v. Click OK three times.

b. If the entry doesn’t exist, click New….

The Edit Environment Variable dialog displays.

i. In the Variable Name box, type Path.

ii. In the Variable Value box, type %USERPROFILE%\dev\flutter\bin

iii. Click OK three times.

4. To enable these changes, close and reopen any existing command prompts and
PowerShell instances.

Configure Android development


Configure the Android toolchain in Android Studio

helpHelp
To create Android apps with Flutter, verify that the following Android components have been
installed.

 Android SDK Platform, API 34.0.0


 Android SDK Command-line Tools
 Android SDK Build-Tools
 Android SDK Platform-Tools
 Android Emulator

If you haven’t installed these, or you don’t know, continue with the following procedure.

Otherwise, you can skip to the next section.

 First time using Android Studio


 Current Android Studio User

1. Launch Android Studio.

The Welcome to Android Studio dialog displays.

2. Follow the Android Studio Setup Wizard.

3. Install the following components:

o Android SDK Platform, API 34.0.0


o Android SDK Command-line Tools
o Android SDK Build-Tools
o Android SDK Platform-Tools
o Android Emulator

Configure your target Android device

 Virtual Device
 Physical Device

Set up the Android emulator

helpHelp
To configure your Flutter app to run in an Android emulator, follow these steps to create and
select an emulator.

1. Enable VM acceleration on your development computer.

2. Start Android Studio.

3. Go to the Settings dialog to view the SDK Manager.

1. If you have a project open, go to Tools > Device Manager.

2. If the Welcome to Android Studio dialog displays, click the More


Options icon that follows the Open button and click Device Manager from
the dropdown menu.
4. Click Virtual.

5. Click Create Device.

The Virtual Device Configuration dialog displays.

6. Select either Phone or Tablet under Category.

7. Select a device definition. You can browse or search for the device.

8. Click Next.

9. Click x86 Images.

10. Click one system image for the Android version you want to emulate.

a. If the desired image has a Download icon to the right of the Release Name,
click it.

The SDK Quickfix Installation dialog displays with a completion meter.

b. When the download completes, click Finish.

11. Click Next.

The Virtual Device Configuration displays its Verify Configuration step.

12. To rename the Android Virtual Device (AVD), change the value in the AVD
Name box.

13. Click Show Advanced Settings and scroll to Emulated Performance.

14. From the Graphics dropdown menu, select Hardware - GLES 2.0.

This enables hardware acceleration and improves rendering performance.

15. Verify your AVD configuration. If it is correct, click Finish.

To learn more about AVDs, check out Managing AVDs.

16. In the Device Manager dialog, click the Run icon to the right of your desired AVD.
The emulator starts up and displays the default canvas for your selected Android OS
version and device.

Agree to Android licenses

helpHelp
Before you can use Flutter and after you install all prerequisites, agree to the licenses of the
Android SDK platform.
1. Open an elevated console window.

2. Run the following command to enable signing licenses.

content_copy
C:\> flutter doctor --android-licenses
If you accepted the Android Studio licenses at another time, this command returns:

content_copy
[========================================] 100% Computing updates...
All SDK package licenses accepted.
You can skip the next step.

3. Before agreeing to the terms of each license, read each with care.

Troubleshooting licensing issues


How to fix the error of finding Java install

Check your development setup


helpHelp
Run Flutter doctor
The flutter doctor command validates that all components of a complete Flutter
development environment for Windows.

1. Open PowerShell.

2. To verify your installation of all the components, run the following command.

content_copy
C:\> flutter doctor
As you chose to develop for Android, you do not need all components. If you followed this
guide, the result of your command should resemble:

content_copy
Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.3, on Microsoft Windows 11 [Version
10.0.22621.3155], locale en)
[✓] Windows version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version
34.0.0)
[!] Chrome - develop for the web
[!] Visual Studio - develop Windows apps
[✓] Android Studio (version 2023.1 (Hedgehog) or later)
[✓] VS Code (version 1.86)
[✓] Connected device (1 available)
[✓] Network resources

! Doctor found issues in 2 categories.


Troubleshoot Flutter doctor issues
When the flutter doctor command returns an error, it could be for Flutter, VS Code,
Android Studio, the connected device, or network resources.

If the flutter doctor command returns an error for any of these components, run it again
with the verbose flag.

content_copy
C:\> flutter doctor -v
Check the output for other software you might need to install or further tasks to perform.

If you change the configuration of your Flutter SDK or its related components, run flutter
doctor again to verify the installation.

Start developing Android on Windows apps with Flutter


Congratulations! Now that you have installed all prerequisites and the Flutter SDK, you
should be able to start developing Flutter apps for Android on Windows.

Manage your Flutter SDK


To learn more about managing your Flutter SDK install, consult the following resources.

 Upgrade Flutter
 Add Web debugging tools
 Add Windows desktop compiliation tools
 Uninstall Flutter

Vous aimerez peut-être aussi