Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Fultter build environment

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Download content:

Download flutter sdk:

Address: https://flutter.dev/docs/development/tools/sdk/releases#windows

two。 Download android studio

Address: http://www.android-studio.org/index.php/download

3. Download android sdk

Address: http://tools.android-studio.org/index.php/sdk (window package)

4. Download jdk

Address: https://www.oracle.com/technetwork/java/javase/downloads/index.html

Configure environment variable: PUB_HOSTED_URL= https://pub.flutter-io.cnFLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cnJAVA_HOME = path of jdk you downloaded flutter_home = path of flutter sdk you downloaded

Action:

1. Find flutter_console.bat in the flutter file in the Flutter installation directory, double-click to run and start the flutter command line, and then you can run the flutter command on the Flutter command line.

2.` run flutter doctor

Open a new command prompt or PowerShell window and run the following command to see if any dependencies need to be installed to complete the installation:

Flutter doctor`

3. If you get the interface below, flutter has been installed successfully.

Install flutter dependencies

Continue typing flutter doctor in cmd. You can see the following prompt:

The first x above is that there is no android licenses. Just type flutter doctor-- android-licenses again, and select y for all.

Continue to run flutter doctor, as follows

These two xs are because Android Studio does not have plugin installed.

Android Studio install plugin

Open Android Studio,File-> Setting-> Plugins

Search for flutter and click install

After the installation is completed, you need to restart Android Studio once, and continue to execute flutter doctor once after reboot.

Open Android Studio,File-> Setting, and then set flutter sdk in android studio

Click File-> New of Android Studio to see New Flutter Project... Option

All right, at this point, the development environment for flutter is set up. As a rule, let's have a hello world test.

Set up the Android simulator

To prepare to run and test your Flutter application on the Android simulator, follow these steps:

Start Android Studio > Tools > Android > AVD Manager and select Create Virtual Device.

Select a device and select Next.

Select one or more system images for the version of Android you want to simulate, and then select Next. It is recommended to use x86 or x86'64 image.

Under Emulated Performance, select Hardware-GLES 2.0 to enable hardware acceleration.

Verify that the AVD configuration is correct, and then select Finish.

In Android Virtual Device Manager, click Run on the toolbar. The simulator starts and displays the boot screen of the selected operating system version or device.

Run flutter run to start your device. The name of the connected device is Android SDK built for, where platform is the chip family, such as x86.

The above interface appears in the simulator, so building the environment can be regarded as ok.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report