安卓开发环境搭建

2020-05-09  本文已影响0人  晨_e6a1

chocolatey

官网

https://www.chocolatey.org/install

安装(powershell)

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

dart

官网

https://www.dartcn.com/

安装dart-sdk

choco install dart-sdk

flutter

官网

https://flutter.dev/

安装

官网下载安装包,解压至D盘,获取bin目录,添加至path系统变量中

验证安装是否成功

flutter

检查flutter开发环境

flutter doctor

创建flutter_app

flutter create flutter_app
cd flutter_app
flutter run

flutter遇到问题

flutter create 进程较慢

参考https://blog.csdn.net/huanggan08/article/details/88641198

set PUB_HOSTED_URL=https://pub.flutter-io.cn
set FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

flutter run 进程较慢,长时间卡在Running Gradle task 'assembleDebug'...

windows参考https://segmentfault.com/a/1190000021451897?utm_source=tag-newest

maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
修改build.gradle image.png
修改D:\flutter\packages\flutter_tools\gradle\flutter.gradle image.png

react-native

官网

https://reactnative.cn/

安装nrm

npm install -g nrm

安装nodejs

https://nodejs.org/en/

安装python2

https://www.python.org/downloads/release/python-2717/

安装JDK

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

安装android-studio

https://reactnative.cn/docs/getting-started.html

新建app

npx react-native init AwesomeProject
cd ./AwesomeProject
npm run android
上一篇下一篇

猜你喜欢

热点阅读