1、Flutter Run出現(xiàn)Error connecting to the service protocol: HttpException: Connection closed before full
flutter 在模擬器上運行,
flutter run
報錯Flutter Run出現(xiàn)Error connecting to the service protocol: HttpException: Connection closed before full
后償試模擬器的sdk用28的就可以了,原用最新的29
網(wǎng)上大多說代理的事
https://blog.csdn.net/qq_39099317/article/details/88101985
2、解決 Android Studio 開發(fā) Flutter時 Colors 提示卡住的問題
分析原因
Flutter文檔提示采用的是MarkDown解析,在Flutter的源碼文檔注釋中含有大量的圖片標(biāo)簽** ![]**,所以在提示的時候,會訪問網(wǎng)絡(luò),加載這些圖片資源。 大量的網(wǎng)絡(luò)請求,導(dǎo)致提示卡住。
在使用 Colors. 的時候卡頓最為明顯。
解決
設(shè)置 editor->general->code completion->show the documentation popup in xxx ms ,取消勾選,這個意思是自動補全時不要彈出右側(cè)的文檔窗口,打碼的時候就不會卡死了,不過如果真的需要彈出文檔還是會卡死
http://www.lxweimin.com/p/5e8bca3264e4
3、AndroidStudio不顯示New Flutter Project
今天在Androidstudio上配置flutter時遇到個奇葩問題,flutter和dart都已在本地配置好了,Android Studio也已經(jīng)按照了flutter和dart插件,并且可以正常編譯flutter項目,但就是不顯示new Flutter Project菜單
后來百度了一下午,一點相關(guān)的信息都沒有,然后使用大Google,第一條就顯示的我這種情況,附上解決連接
原來是AndroidApkSupport沒有勾上
然后重啟Android Studio,歡迎頁面和工程頁面File->New下已經(jīng)顯示New Flutter Project菜單了。
ps:Google搜索強大!
4、Flutter 運行 一直Initializing gradle...,和模擬器運行白屏問題
運行,一直 Initializing gradle
在Flutter SDK 找到 這個gradle 文件 打開。
google() 和 jcenter() 注釋掉。下面添加
repositories {
// google()
jcenter()
maven { url 'https://dl.google.com/dl/android/maven2' }
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' }
}
原因就是,中國訪問不了google,改為使用鏡像訪問。翻墻的人可以不用管
5、模擬器白屏問題:
run->Edit Configurations 里面添加--enable-software-rendering 再次運行就OK了。
6、Waiting for another flutter command to release the startup lock
運行flutter doctor 提示
查了一下github的flutter issue 找到了解決方法,如下:
CTRL+ALT+DEL 關(guān)閉所有 dart進程和android進程,注意adb這個別忘了關(guān)
1、打開flutter的安裝目錄/bin/cache/
2、刪除lockfile文件
3、重啟AndroidStudio