FunFlutter 系列之疑難雜症①

收集開發中遇到的問題

xxx.dart were declared as an inputs, but did not exist

編譯時出現android

xxx/xxx.dart were declared as an inputs, but did not exist. Check the definition of target:kernel_snapshot for errorsios

由於本身在兩個分支切換,分支2比分支1多了幾個文件如(xxx.dart),當切回到分支1編譯的時候,編譯失敗並提示xxx.dart were declared as an input ,but id not exist,第一反應是緩存刪除build目錄,沒有效果.git

最後發現刪除IDE的.dart_tool文件夾便可.或者直接命令行運行flutter cleangithub


Gradle build failed to produce an Android package.

build.gradle中修改了Android APK的文件名 就會出現如下的錯誤:xcode

Finished with error: Gradle build failed to produce an Android package緩存


Could not find the built application bundle at build/ios/iphonesimulator/Runner.app

在xcode11的版本中,在General裏修改了Display Name,若是經過Android Studio或VS Code運行的時候會出現以上的錯誤.是由於運行時查找的是Runner.app而編譯生成的是你修改事後的名字.app

解決方案:iphone

還原GeneralDisplay NameRunner.app;而後在info也就是plist中 修改Bundle display name爲你想修改的文件名;而後經過AS或者VS運行一下;這時候當我在xcode切回到Generaltab裏,會發現Display Name已經修改成你要改的名字.gradle


ProcessException: Process "xxx/xxx/android/gradlew" exited abnormally

通常會發生在VsCode中,本地Gradle版本不一致致使的問題 詳情能夠看這個 issue29的第二條commentui

相關文章
相關標籤/搜索