首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >失败:生成失败,出现异常- Flutter

失败:生成失败,出现异常- Flutter
EN

Stack Overflow用户
提问于 2020-09-22 01:35:55
回答 1查看 150关注 0票数 0

我试图构建我的应用程序,但它总是返回这个奇怪的错误:

代码语言:javascript
复制
Launching lib\main.dart on M2003J15SC in debug mode...

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':location:compileDebugJavaWithJavac'.
> File 'C:\Native\findhelpapp\findhelpapp\build\location\intermediates\annotation_processor_list\debug\annotationProcessors.json' specified for property 'processorListFile' does not exist.

* 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 52s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

我试图运行flutter clean并重新构建项目,但它也不起作用:"(

那么我应该怎么做才能修复这个错误呢?

我的flutter doctor日志:-

代码语言:javascript
复制
C:\Native\findhelpapp\findhelpapp>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.20.4, on Microsoft Windows [Version 10.0.18362.1082], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Android Studio (version 3.6)
[√] IntelliJ IDEA Community Edition (version 2019.3)
[√] VS Code (version 1.49.1)
[√] Connected device (1 available)

• No issues found!

C:\Native\findhelpapp\findhelpapp>
EN

回答 1

Stack Overflow用户

发布于 2020-09-22 20:20:09

  1. 检查Android SDK和Jdk位置

2.复制gradle.properties末尾的下一行

android.useAndroidX=true

android.enableJetifier=true

  1. 并设置最新版本

在文件app\build.gradle上

代码语言:javascript
复制
android {
 compileSdkVersion 28

defaultConfig {
minSdkVersion 21
targetSdkVersion 28
multiDexEnabled true

}

4.运行你的应用程序

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63997339

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档