android - 显示 “Finished with error: Gradle task assembleDebug failed with exit code 1”。在Android Studio中运行Flutter。该怎么办?

标签 android android-studio flutter dart android-emulator

这在控制台中显示

dyld:库未加载:@ rpath / libswiftCore.dylib
引用自:/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
原因:找不到图片
git:错误:无法找到xcodebuild,请确保Xcode文件夹的路径设置正确!
git:错误:您可以使用/ usr / bin / xcode-select -switch设置Xcode文件夹的路径
在vivo 1951上以 Debug模式启动lib / main.dart ...
正在运行Gradle任务'assembleDebug'...
在/ Users / macbook / Library / Android / sdk / licenses中检查软件包Android SDK Build-Tools 28.0.3的许可证
警告:不接受Android SDK Build-Tools 28.0.3软件包的许可证。
在/ Users / macbook / Library / Android / sdk / licenses中检查Android SDK Platform 28软件包的许可证
警告:不接受Android SDK Platform 28软件包的许可证。

失败:生成失败,发生异常。

  • 出了什么问题:
    无法确定任务':app:compileDebugJavaWithJavac'的依赖关系。

    Failed to install the following Android SDK packages as some licences have not been accepted. build-tools;28.0.3 Android SDK Build-Tools 28.0.3 platforms;android-28 Android SDK Platform 28 To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager. Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html



    使用Android SDK:/ Users / macbook / Library / Android / sdk
  • 尝试:
    使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。与--scan一起运行以获取完整的见解。
  • https://help.gradle.org上获得更多帮助

  • 2秒内失败
    错误完成:Gradle任务assembleDebug失败,退出代码为1

    有人请帮助我。

    最佳答案

    在控制台中运行Flutter Doctor --android-licenses并接受android许可证
    然后运行 flutter 医生以确保一切正常

    关于android - 显示 “Finished with error: Gradle task assembleDebug failed with exit code 1”。在Android Studio中运行Flutter。该怎么办?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60118981/

    相关文章:

    android - 单击通知时,Android 上的 Flutter 应用程序不会打开应用程序

    Android - 如何通过代码将图像放置在现有布局之上?

    Android Emulator "Allow USB Debugging"对话框在显示后立即关闭

    android - 我用Android Studio生成的APK无法正常工作

    java - Google map api 搜索位置并添加显示 NullPointEreException 错误的标记

    android - 在 android studio 中创建新的资源目录时,什么是限定符?

    flutter - 需要像 Flutter 中的 Uber 那样的 Voip 通话

    flutter - 如何在 Flutter 中向 LinearProgressIndicator 添加边界/角半径?

    java - 使用 while 循环将多个 LinearLayout 添加到 ScrollView 中

    android - 从 XML 动态获取状态栏高度