記錄一次AS偶發(fā)異常導(dǎo)致的項目構(gòu)建失敗問題
以下是報錯信息
Could not determine the dependencies of task ‘:app:mergeCeshiDebugAssets’.
Could not resolve all task dependencies for configuration ‘:app:CeshiDebugRuntimeClasspath’.
Could not resolve project :flutter.
Required by:
project :app
No matching configuration of project :flutter was found. The consumer was configured to find a runtime of a component, as well as attribute ‘com.android.build.api.attributes.BuildTypeAttr’ with value ‘debug’, attribute ‘stage’ with value ‘Ceshi’, attribute ‘org.jetbrains.kotlin.platform.type’ with value ‘a(chǎn)ndroidJvm’ but:
- None of the consumable configurations have attributes.
通過排查、嘗試,可以嘗試一下操作:
- 將報錯的對應(yīng)構(gòu)建文件刪除(這個步驟具體需要看是否在以上報錯前還有報其他錯誤條件,這邊是還有其他報錯的,刪完就沒再報了)
- 清一下緩存重啟AS(這個步驟僅屬于穩(wěn)妥操作)
- 切到Flutter組件下,執(zhí)行一下命令:
flutter clean
flutter pub get
- 重新構(gòu)建,構(gòu)建成功。
問題:flutter\bin\flutter.bat’’ finished with non-zero exit value 1
Caused by: org.gradle.process.internal.ExecException: Process ‘command ‘D:\flutter2.5.3\flutter\bin\flutter.bat’’ finished with non-zero exit value 1
不要管這個報錯信息,往上翻另一個報錯的日志。
Error: No named parameter with the name ‘#3’.
child: Image.asset(
^^…
/D:/fflutter/packages/flutter/lib/src/widgets/image.dart:605:3: Context: Found this candidate, but the arguments don’t match.
Image.asset(
^^^^^^^^^^^文章來源:http://www.zghlxwxcb.cn/news/detail-661806.html
修復(fù)掉這個簡單問題,最初的那個報錯就不會繼續(xù)報了。不用理會上面記錄的第一個報錯。文章來源地址http://www.zghlxwxcb.cn/news/detail-661806.html
到了這里,關(guān)于Flutter混合項目構(gòu)建問題集錦的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!