简体   繁体   English

Flutter 连接:compileDebugJavaWithJavac 错误

[英]Flutter connectivity:compileDebugJavaWithJavac error

I have a Flutter project and it's work on other systems successfully.我有一个 Flutter 项目,它在其他系统上成功运行。 now I'm new in the team and today I pulled the project on my PC.现在我是团队的新成员,今天我在我的 PC 上拉了这个项目。 Unfortunately, I got an error and cant build the project.不幸的是,我出错了,无法构建项目。

warning: [options] source value 7 is obsolete and will be removed in a future release warning: [options] target value 7 is obsolete and will be removed in a future release warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.警告:[options] 源值 7 已过时,将在未来版本中移除 警告:[options] 目标值 7 已过时,将在未来版本中移除Xlint:-选项。 error: warnings found and -Werror specified错误:发现警告并指定 -Werror

FAILURE: Build failed with an exception. FAILURE:构建失败,出现异常。

  • What went wrong: Execution failed for task ':connectivity:compileDebugJavaWithJavac'.出了什么问题:任务 ':connectivity:compileDebugJavaWithJavac' 执行失败。

Compilation failed;编译失败; see the compiler error output for details.有关详细信息,请参阅编译器错误输出。

  • Try: Run with --stacktrace option to get the stack trace.尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output.使用 --info 或 --debug 选项运行以获得更多日志输出。 Run with --scan to get full insights.使用 --scan 运行以获得完整的见解。

  • Get more help at https://help.gradle.orghttps://help.gradle.org获取更多帮助

BUILD FAILED in 12s Exception: Gradle task assembleDebug failed with exit code 1在 12 秒内构建失败异常:Gradle 任务 assembleDebug 失败,退出代码为 1

在此处输入图片说明

在此处输入图片说明

anybody can help me!?任何人都可以帮助我!?

Maybe the error is related to your SDK version.错误可能与您的 SDK 版本有关。 Please upgrade it.请升级它。

In your android/build.gradle File在你的 android/build.gradle 文件中

buildscript {
repositories {
    google()
    jcenter()
}
dependencies {
    classpath "com.android.tools.build:gradle:3.5.0"
    ...
}
}

And also add In your android/gradle/wrapper/gradle-wrapper.properties.并在你的 android/gradle/wrapper/gradle-wrapper.properties 中添加。

distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip

Taken from https://github.com/flutter/flutter/issues/67996#issuecomment-707696255摘自https://github.com/flutter/flutter/issues/67996#issuecomment-707696255

It is recommended to shift to connectivity_plus instead of connectivity as it might not be properly supported建议改用connectivity_plus而不是connectivity因为它可能不被正确支持

Here is the installation guide是安装指南

If not then please check the issues thread as above, most probably it is an issue with your setup如果没有,请检查上面的问题线程,很可能是您的设置有问题

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Flutter - 任务 ':connectivity:compileDebugJavaWithJavac' 执行失败 - Flutter - Execution failed for task ':connectivity:compileDebugJavaWithJavac' 如何在 flutter 中修复此错误“app:compiledebugjavawithjavac” - How to fix this error 'app:compiledebugjavawithjavac ' in flutter 无法运行连接 Package 的项目原因,任务“:connectivity_plus:compileDebugJavaWithJavac”执行失败。 错误 - cannot run project cause of connectivity Package with Execution failed for task ':connectivity_plus:compileDebugJavaWithJavac'. error flutter 错误:任务“:flutter_inappwebview:compileDebugJavaWithJavac”执行失败 - flutter error: Execution failed for task ':flutter_inappwebview:compileDebugJavaWithJavac' Flutter 构建错误:无法确定任务':app:compileDebugJavaWithJavac的依赖关系 - Flutter Build Error:Could not determine the dependencies of task ':app:compileDebugJavaWithJavac flutter 错误无法确定任务':app:compileDebugJavaWithJavac'的依赖关系 - flutter error Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' Android Studio 错误 compileDebugJavaWithJavac - Android Studio Error compileDebugJavaWithJavac Android Studio中的compileDebugJavaWithJavac错误 - compileDebugJavaWithJavac error in Android Studio Flutter Android build 无法确定任务“:app:compileDebugJavaWithJavac”的依赖项 Google Play 服务错误 - Flutter Android build Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' Google Play Services Error flutter 错误无法确定任务':app:compileDebugJavaWithJavac'和配置':app:debugCompileClasspath'的依赖关系 - flutter error Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' and config ':app:debugCompileClasspath'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM