最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

大成帶你跑Flutter 畫(huà)廊例子

2020-05-29 21:17 作者:嗨大成  | 我要投稿

Flutter Gallery

Flutter 畫(huà)廊是一個(gè)資源,以幫助開(kāi)發(fā)人員評(píng)估和使用顫振。它是一個(gè)材料設(shè)計(jì)的集合&Cupertino小部件、行為和vignette實(shí)現(xiàn)了Flutter。我們經(jīng)常被問(wèn)到如何才能看到顫振的動(dòng)作,這個(gè)畫(huà)廊展示了顫振提供了什么,以及它在野外的表現(xiàn)。

克隆代碼

git clone https://github.com/flutter/gallery.git

命令集合

如果您想運(yùn)行Flutter畫(huà)廊例子,請(qǐng)確保首先切換到主頻道:

flutter channel master

flutter upgrade

flutter upgrade 下載需要過(guò)程
Downloading Dart SDK from Flutter engine 17737e6fd4ec28d83ecc1f159e50f9330f5befb1...
? % Total ? ?% Received % Xferd ?Average Speed ? Time ? ?Time ? ? Time ?Current
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Dload ?Upload ? Total ? Spent ? ?Left ?Speed
100 ?227M ?100 ?227M ? ?0 ? ? 0 ?2357k ? ? ?0 ?0:01:38 ?0:01:38 --:--:-- 3068k

Building flutter tool...
Flutter is already up to date on channel master
Flutter 1.19.0-2.0.pre.193 ? channel master ? https://github.com/flutter/flutter.git
Framework ? revision fed18fc433 (4 hours ago) ? 2020-05-29 03:43:01 -0400
Engine ? revision 17737e6fd4
Tools ? Dart 2.9.0 (build 2.9.0-11.0.dev 6489a0c68d)

Flutter畫(huà)廊支持的平臺(tái)

包括:研究后這個(gè)例子,比較全,會(huì)有收獲的。

  • Android

  • iOS

  • web

  • macOS

  • Linux

  • Windows

注意:您可以自己從源代碼構(gòu)建這些平臺(tái),請(qǐng)注意必須啟用桌面支持。例如,要在Windows上運(yùn)行應(yīng)用程序

alue to "true". ? ? ? ? ? ? ? ??

You may need to restart any open editors for them to read new settings.
AppledeMacBook-Pro:gallery apple$ flutter create .
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Downloading package sky_engine... ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0.6s
Downloading flutter_patched_sdk tools... ? ? ? ? ? ? ? ? ? ? ? ? ? ?4.8s
Downloading flutter_patched_sdk_product tools... ? ? ? ? ? ? ? ? ? 45.5s
Downloading darwin-x64 tools... ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?10.8s
Downloading darwin-x64/font-subset tools... ? ? ? ? ? ? ? ? ? ? ? ? 1.1s
?
Recreating project .... ? ? ? ? ? ? ? ? ? ??
? windows/Runner.vcxproj (created)
? windows/runner/flutter_window.cpp (created)
? windows/runner/utils.h (created)
? windows/runner/run_loop.h (created)
? windows/runner/utils.cpp (created)
? windows/runner/runner.exe.manifest (created)
? windows/runner/win32_window.h (created)
? windows/runner/win32_window.cpp (created)
? windows/runner/resources/app_icon.ico (created)
? windows/runner/window_configuration.cpp (created)
? windows/runner/resource.h (created)
? windows/runner/run_loop.cpp (created)
? windows/runner/Runner.rc (created)
? windows/runner/main.cpp (created)
? windows/runner/window_configuration.h (created)
? windows/runner/flutter_window.h (created)
? windows/Runner.sln (created)
? windows/AppConfiguration.props (created)
? windows/flutter/.template_version (created)
? windows/.gitignore (created)
? windows/Runner.vcxproj.filters (created)
? windows/scripts/prepare_dependencies.bat (created)
? windows/scripts/bundle_assets_and_deps.bat (created)
? windows/FlutterBuild.vcxproj (created)
? gallery.iml (created)
? web/favicon.png (created)
? android/gallery_android.iml (created)
? .idea/runConfigurations/main_dart.xml (created)
? .idea/libraries/Dart_SDK.xml (created)
? .idea/libraries/KotlinJavaRuntime.xml (created)
Running "flutter pub get" in gallery... ? ? ? ? ? ? ?

All done!
[?] Flutter: is fully installed. (Channel master, 1.19.0-2.0.pre.193, on Mac OS X 10.14.6 18G4032, locale zh-Hans-CN)
[!] Android toolchain - develop for Android devices: is partially installed; more components are available. (Android SDK version 29.0.3)
[!] Xcode - develop for iOS and macOS: is partially installed; more components are available. (Xcode 11.3.1)
[?] Chrome - develop for the web: is fully installed.
[?] Android Studio: is fully installed. (version 3.6)
[!] IntelliJ IDEA Ultimate Edition: is partially installed; more components are available. (version 2020.1)
[?] Connected device: is fully installed. (3 available)

Run "flutter doctor" for information about installing additional components.

In order to run your application, type:

運(yùn)行$ flutter run


Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Downloading android-arm-profile/darwin-x64 tools... ? ? ? ? ? ? ? ? 1.0s
Downloading android-arm-release/darwin-x64 tools... ? ? ? ? ? ? ? ? 1.0s
Downloading android-arm64-profile/darwin-x64 tools... ? ? ? ? ? ? ? 1.1s
Downloading android-arm64-release/darwin-x64 tools... ? ? ? ? ? ? ? 3.3s
Downloading android-x64-profile/darwin-x64 tools... ? ? ? ? ? ? ? ? 1.1s
Downloading android-x64-release/darwin-x64 tools... ? ? ? ? ? ? ? ? 1.0s
Downloading Web SDK... ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?3.6s
Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'... ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?注: /Users/apple/tools/flutter/.pub-cache/hosted/pub.flutter-io.n/url_launcher-5.4.10/android/src/main/java/io/flutter/plugins/urllauncher/WebViewActivity.java使用或覆蓋了已過(guò)時(shí)的 API。
注: 有關(guān)詳細(xì)信息, 請(qǐng)使用 -Xlint:deprecation 重新編譯。 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
Running Gradle task 'assembleDebug'... ? ? ? ? ? ? ? ? ? ? ? ? ?(This is taking an unexpectedly long time.) ? ? ? ?

要包含新的splash動(dòng)畫(huà),這需要一段出乎意料的長(zhǎng)時(shí)間。

第一次編譯錯(cuò)誤了

* What went wrong: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
Could not resolve all files for configuration ':package_info:lintClassPath'. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
> Could not download groovy-all.jar (org.codehaus.groovy:groovy-all:2.4.12) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ?> Could not get resource 'https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.12/groovy-all-2.4.12.jar'.
? ? ? > Read timed out ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
* Try: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
* Get more help at https://help.gradle.org ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
BUILD FAILED in 8m 28s ? ? ? ? ? ? ??

第二編譯,用AS編譯,運(yùn)行Flutter run提示

flutter run 需要制定具體的device 全部-d all 不現(xiàn)實(shí),畢竟就8G內(nèi)存,全跑估計(jì)就掛啦。
More than one device connected; please specify a device with the '-d <deviceId>' flag, or use '-d all' to act on all devices.

Android SDK built for x86 ? emulator-5554 ? ? ? ? ? ? ? ? ? ? ? ?? android-x86 ? ?? Android 10 (API 29) (emulator)
iPhone 11 Pro Max ? ? ? ? ? 84F452D0-81AC-41A4-82E2-7238B8031D51 ? ios ? ? ? ? ? ?? com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)
Web Server ? ? ? ? ? ? ? ?? web-server ? ? ? ? ? ? ? ? ? ? ? ? ? ? web-javascript ? Flutter Tools
Chrome ? ? ? ? ? ? ? ? ? ?? chrome ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? web-javascript ? Google Chrome 83.0.4103.61

重新安裝cocoapods,提示下面錯(cuò)誤

ERROR: ?Error installing cocoapods:
? ? ? ? ERROR: Failed to build gem native extension.

? ? current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.12.2/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20200529-79302-hzzped.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/ffi-1.12.2 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/ffi-1.12.2/gem_make.out

重新安裝cocoapods

先運(yùn)行android?Flutter run -d run-android

編譯成功就是比較慢

The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
?? ?Creating `android/settings_aar.gradle`...
? `android/settings_aar.gradle` created successfully.
Building plugin package_info...
Running Gradle task 'assembleAarRelease'...
? Built build/app/outputs/repo.
Building plugin path_provider...
Running Gradle task 'assembleAarRelease'...
? Built build/app/outputs/repo.
Building plugin shared_preferences...
Running Gradle task 'assembleAarRelease'...

web的運(yùn)行起來(lái)了。好慢

運(yùn)行效果為:

Web Flutter例子部分效果圖


小結(jié)

效果不錯(cuò),后面繼續(xù)回拆出來(lái)學(xué)習(xí)。









大成帶你跑Flutter 畫(huà)廊例子的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
龙岩市| 汕头市| 塘沽区| 稻城县| 安康市| 临沧市| 江安县| 无棣县| 庆安县| 阳谷县| 巴林右旗| 且末县| 黄龙县| 武宣县| 吉水县| 闸北区| 太保市| 双流县| 海门市| 芷江| 中阳县| 友谊县| 梓潼县| 苗栗县| 威信县| 桐庐县| 民县| 剑河县| 灵寿县| 遂溪县| 望谟县| 琼结县| 健康| 浦城县| 和田市| 宁晋县| 疏勒县| 罗江县| 历史| 连城县| 定襄县|