真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

Flutter入門

Dart語(yǔ)言中文網(wǎng)?http://dart.goodev.org/

公司主營(yíng)業(yè)務(wù):做網(wǎng)站、網(wǎng)站制作、移動(dòng)網(wǎng)站開發(fā)等業(yè)務(wù)。幫助企業(yè)客戶真正實(shí)現(xiàn)互聯(lián)網(wǎng)宣傳,提高企業(yè)的競(jìng)爭(zhēng)能力。創(chuàng)新互聯(lián)是一支青春激揚(yáng)、勤奮敬業(yè)、活力青春激揚(yáng)、勤奮敬業(yè)、活力澎湃、和諧高效的團(tuán)隊(duì)。公司秉承以“開放、自由、嚴(yán)謹(jǐn)、自律”為核心的企業(yè)文化,感謝他們對(duì)我們的高要求,感謝他們從不同領(lǐng)域給我們帶來的挑戰(zhàn),讓我們激情的團(tuán)隊(duì)有機(jī)會(huì)用頭腦與智慧不斷的給客戶帶來驚喜。創(chuàng)新互聯(lián)推出東乃免費(fèi)做網(wǎng)站回饋大家。

Flutter官網(wǎng)?https://flutter.dev/

Flutter中文網(wǎng)? https://flutterchina.club/

一、windows環(huán)境搭建

  • 配置鏡像(加快FlutterSDK下載)? ? ? ?

????? ?官方寫的這個(gè)export是用在linux上的

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

????? ?window上要將export換成set,但是去環(huán)境變量界面查看竟然沒有

????????Flutter入門

????????cmd 輸入set,會(huì)查看所有的環(huán)境變量,發(fā)現(xiàn)有設(shè)置的環(huán)境變量。

  • 下載FlutterSDK

    下載FlutterSDK,在path里配置“flutter\bin”的環(huán)境變量。

    執(zhí)行flutter doctor,下載FlutterSDK相關(guān)的依賴。

? ? ??

  • Android Studio上安裝Flutter和Dart插件

二、創(chuàng)建Flutter項(xiàng)目

  • 創(chuàng)建項(xiàng)目

??????Flutter入門

????????這里的flutter sdk path就是flutter文件夾位置

????????Flutter入門

???????*****和創(chuàng)建Android APP項(xiàng)目對(duì)比可發(fā)現(xiàn),沒有了minSdk、targetSdk這些個(gè)選項(xiàng)。(意思)

????????

  • 運(yùn)行項(xiàng)目

????? 首次運(yùn)行,可能會(huì)有以下錯(cuò)誤:

Launching?lib\main.dart?on?SM?N9009?in?debug?mode...
Initializing?gradle...
Finished?with?error:?ProcessException:?Process?"F:\Work\Flutter\flutter_app\android\gradlew.bat"?exited?abnormally:
Downloading?https://services.gradle.org/distributions/gradle-4.10.2-all.zip
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Exception?in?thread?"main"?javax.net.ssl.SSLException:?Connection?has?been?shutdown:?javax.net.ssl.SSLException:?java.net.SocketException:?Connection?reset
	at?sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1551)
	at?sun.security.ssl.AppInputStream.available(AppInputStream.java:60)
	at?java.io.BufferedInputStream.available(BufferedInputStream.java:410)
	at?sun.net.www.MeteredStream.available(MeteredStream.java:170)
	at?sun.net.www.http.KeepAliveStream.close(KeepAliveStream.java:85)
	at?java.io.FilterInputStream.close(FilterInputStream.java:181)
	at?sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.close(HttpURLConnection.java:3448)
	at?org.gradle.wrapper.Download.downloadInternal(Download.java:77)
	at?org.gradle.wrapper.Download.download(Download.java:44)
	at?org.gradle.wrapper.Install$1.call(Install.java:61)
	at?org.gradle.wrapper.Install$1.call(Install.java:48)
	at?org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
	at?org.gradle.wrapper.Install.createDist(Install.java:48)
	at?org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
	at?org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused?by:?javax.net.ssl.SSLException:?java.net.SocketException:?Connection?reset
	at?sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
	at?sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1959)
	at?sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1916)
	at?sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1880)
	at?sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1825)
	at?sun.security.ssl.AppInputStream.read(AppInputStream.java:116)
	at?java.io.BufferedInputStream.read1(BufferedInputStream.java:284)
	at?java.io.BufferedInputStream.read(BufferedInputStream.java:345)
	at?sun.net.www.MeteredStream.read(MeteredStream.java:134)
	at?java.io.FilterInputStream.read(FilterInputStream.java:133)
	at?sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3375)
	at?sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3368)
	at?org.gradle.wrapper.Download.downloadInternal(Download.java:62)
	...?7?more
Caused?by:?java.net.SocketException:?Connection?reset
	at?java.net.SocketInputStream.read(SocketInputStream.java:210)
	at?java.net.SocketInputStream.read(SocketInputStream.java:141)
	at?sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
	at?sun.security.ssl.InputRecord.readV3Record(InputRecord.java:593)
	at?sun.security.ssl.InputRecord.read(InputRecord.java:532)
	at?sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
	at?sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:940)
	at?sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
	...?14?more
??Command:?F:\Work\Flutter\flutter_app\android\gradlew.bat?-v

? ? 這個(gè)是在下載gradle,網(wǎng)絡(luò)不好的原因。如果網(wǎng)絡(luò)好了,run會(huì)自動(dòng)下載gradle,run成功之后,控制臺(tái)會(huì)顯示:

????Launching?lib\main.dart?on?SM?N9009?in?debug?mode...
Initializing?gradle...
Resolving?dependencies...
[{"event":"app.progress","params":{"appId":"d62136c6-30c8-4426-8e6e-e1ec5bdf918e","id":"2","progressId":null,"message":"Running?Gradle?task?'assembleDebug'..."}}]Running?Gradle?task?'assembleDebug'...

Built?build\app\outputs\apk\debug\app-debug.apk.
Installing?build\app\outputs\apk\app.apk...
[{"event":"app.progress","params":{"appId":"d62136c6-30c8-4426-8e6e-e1ec5bdf918e","id":"4","progressId":null,"message":"Syncing?files?to?device?SM?N9009..."}}]Syncing?files?to?device?SM?N9009...

?? ? 趕緊體驗(yàn)了一把“熱重載”特性,實(shí)在是非常爽?。?!

? ? ?另外,通過控制臺(tái)日志可以發(fā)現(xiàn):

Launching?lib\main.dart?on?SM?N9009?in?debug?mode...
Initializing?gradle...
Resolving?dependencies...
Running?Gradle?task?'assembleDebug'...
Built?build\app\outputs\apk\debug\app-debug.apk.
Installing?build\app\outputs\apk\app.apk...
Syncing?files?to?device?SM?N9009...

????? 項(xiàng)目第一次run的時(shí)候,也會(huì)生成apk文件。

  • ?打開項(xiàng)目出現(xiàn)一直提示加載的問題? ??

? ? ? ?Android Studio使用flutter upgrade等時(shí)提示waiting for another flutter command to release the startup lock

????? 解決辦法:

????先打開任務(wù)管理器,結(jié)束掉所有dart.exe。然后打開你的flutter安裝文件夾,找到\bin\cache中的lockfile文件刪除。之后重啟Android?Studio。

????????????????????

  • 依賴package

????? ?****更新yaml文件之后,點(diǎn)擊Packages get,即可將包下載下來。

????? ?Flutter入門

????????然后在dart里import

????????

???????****?yaml文件,點(diǎn)擊Get dependencies,會(huì)報(bào)下面的錯(cuò)誤,不用管就行。

Working?dir:?F:\Work\Flutter\startup_namer
G:\Android\flutter_windows_v1.7.8+hotfix.4-stable\flutter\bin\cache\dart-sdk\bin\pub.bat?upgrade
Resolving?dependencies...
Because?startup_namer?depends?on?flutter_test?any?from?sdk?which?doesn't?exist?(the?Flutter?SDK?is?not?available),?version?solving?failed.

Flutter?users?should?run?`flutter?pub?get`?instead?of?`pub?get`.
Process?finished?with?exit?code?69

????? ? ? ??

? ? ?????


名稱欄目:Flutter入門
本文地址:http://weahome.cn/article/iihepd.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部