这篇文章主要介绍了Linux下怎么部署Flutter开发框架的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇Linux下怎么部署Flutter开发框架文章都会有所收获,下面我们一起来看看吧。
Flutter是Google使用Dart语言开发的移动应用开发框架,使用一套Dart代码就能快速构建高性能、高保真的iOS和Android应用程序,并且在排版、图标、滚动、点击等方面实现零差异。
CentOS Linux release 7.7.1908 (Core) java version "1.8.0_241"git version 2.22.0 Android SDK version 29.0.3 Flutter version 1.12.13+hotfix.9 12345
yum -y install git unzip zip 1
更新git版本
#yum -y install http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm#yum -y install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-1.noarch.rpmyum -y install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm yum -y update git 1234 git version 2.22.0 1
tar -zxvf jdk-8u241-linux-x64.tar.gz -C /usr/local1
#自定义变量export JAVA_HOME=/usr/local/jdk1.8.0_241export ANDROID_HOME=/usr/local/sdkexport FLUTTER_HOME=/usr/local/flutterexport PUB_HOSTED_URL=https://pub.flutter-io.cnexport FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cnexport PATH=${JAVA_HOME}/bin:${ANDROID_HOME}/build-tools/29.0.3:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools:${FLUTTER_HOME}/bin:${PATH}1234567source /etc/profile 1
unzip commandlinetools-linux-6200805_latest.zip -d /usr/localmkdir -p /usr/local/sdkcd /usr/local/tools/bin ./sdkmanager --list --sdk_root=/usr/local/sdk #显示可安装包./sdkmanager --install "platforms;android-29" --sdk_root=/usr/local/sdk #安装android-29./sdkmanager --install "platform-tools" --sdk_root=/usr/local/sdk #安装platform-tools./sdkmanager --install "build-tools;29.0.3" --sdk_root=/usr/local/sdk #安装build-tools./sdkmanager --install "cmdline-tools;latest" --sdk_root=/usr/local/sdk #安装cmdline-tools12345678
cd /usr/local#git clone https://github.com/flutter/flutter.git -b v1.14.4git clone https://github.com/flutter/flutter.git -b stable 123
flutter doctor -v 1 Woah! You appear to be trying to run flutter as root. We strongly recommend running the flutter tool without superuser privileges. / ? [✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Linux, locale en_US.UTF-8) • Flutter version 1.12.13+hotfix.9 at /usr/local/flutter • Framework revision f139b11009 (13 days ago), 2020-03-30 13:57:30 -0700 • Engine revision af51afceb8 • Dart version 2.7.2 [!] Android toolchain - develop for Android devices (Android SDK version 29.0.3) • Android SDK at /usr/local/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 29.0.3 • ANDROID_HOME = /usr/local/sdk • Java binary at: /usr/local/jdk1.8.0_241/bin/java • Java version Java(TM) SE Runtime Environment (build 1.8.0_241-b07) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses [!] 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).[!] Connected device ! No devices available ! Doctor found issues in 3 categories.
关于“Linux下怎么部署Flutter开发框架”这篇文章的内容就介绍到这里,感谢各位的阅读!相信大家对“Linux下怎么部署Flutter开发框架”知识都有一定的了解,大家如果还想学习更多知识,欢迎关注亿速云行业资讯频道。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。