当我试图在调试模式下运行构建时,我得到了这个
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
在再次启动应用程序之前,我已经运行了flutter clean
然后flutter pub get
。它还是不动!flutter doctor
命令结果为OK and fine too
尝试将这一行添加到gradle.properties.
org.gradle.jvmargs=-Xmx4608m
终于成功了!我通过在锅中加入org.gradle.jvmargs=-Xmx4608m
解决了这个问题。属性文件并删除。/gradle/cahes direct✔️