gpt4 book ai didi

android-studio - Flutter:FAILURE:构建失败,出现异常

转载 作者:行者123 更新时间:2023-12-03 05:20:55 25 4
gpt4 key购买 nike

自从Android Studio的最新更新(今天是2020年8月23日)以来,每次创建新的flutter项目时,我都无法运行它。即使我不修改一行代码,而仅创建一个空白的新项目,然后运行它。
我以前的所有flutter项目都可以在我的VD中运行,没有任何问题。但是由于此构建失败,我无法从事新项目。

  • 我使用菜单'File / Invalidate Caches / Restart ...'清空了缓存
  • 我使用flut upgrade --force升级了Flutter,然后像this post一样使用Flutter run -v升级了,但对我不起作用。

    我通过在线类(class)学习 flutter ,但是我不知道该怎么解决。
    你有解决方案吗 ?
    谢谢
    这是控制台(带有新的flutter应用程序项目)中发生的情况:
    Launching lib\main.dart on Android SDK built for x86 in debug mode...
    Running Gradle task 'assembleDebug'...

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':app:mergeDebugResources'.
    > Multiple task action failures occurred:
    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Android resource compilation failed
    C:\Users\Steeve\Documents\Flutter\androidstudio\proj\boule_app\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml: AAPT: error: file failed to compile.

    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Android resource compilation failed
    C:\Users\Steeve\Documents\Flutter\androidstudio\proj\boule_app\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-hi\values-hi.xml: AAPT: error: file failed to compile.

    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Android resource compilation failed
    C:\Users\Steeve\Documents\Flutter\androidstudio\proj\boule_app\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-de\values-de.xml: AAPT: error: file failed to compile.

    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Android resource compilation failed
    C:\Users\Steeve\Documents\Flutter\androidstudio\proj\boule_app\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-lo\values-lo.xml: AAPT: error: file failed to compile.

    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Android resource compilation failed
    C:\Users\Steeve\Documents\Flutter\androidstudio\proj\boule_app\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-pt\values-pt.xml: AAPT: error: file failed to compile.

    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Android resource compilation failed
    C:\Users\Steeve\Documents\Flutter\androidstudio\proj\boule_app\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-lt\values-lt.xml: AAPT: error: file failed to compile.

    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Android resource compilation failed
    C:\Users\Steeve\Documents\Flutter\androidstudio\proj\boule_app\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-hr\values-hr.xml: AAPT: error: file failed to compile.

    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Android resource compilation failed
    C:\Users\Steeve\Documents\Flutter\androidstudio\proj\boule_app\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-lv\values-lv.xml: AAPT: error: file failed to compile.


    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    * Get more help at https://help.gradle.org

    BUILD FAILED in 24s
    Exception: Gradle task assembleDebug failed with exit code 1

  • 最佳答案

    从C:\ Users \ Steve \ Documents \ Flutter \目录中删除android studio文件夹。

    关于android-studio - Flutter:FAILURE:构建失败,出现异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63552047/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com