添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to create Jar file on Fresh Project #109060 java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to create Jar file on Fresh Project #109060 erayerdin opened this issue Aug 5, 2022 · 3 comments
  • Run flutter create --org com.erayerdin --project-name "todos_bloc_freezed_test" --platforms android test_app .
  • Launch Android Emulator and VSCode.
  • Run flutter run --verbose .
  • Get the error.
  • Expected results: For fresh application to compile.

    Actual results: Get Gradle error.

    Code sample Nothing has been touched since `flutter create`. It is the same project.
    [  +89 ms] executing: uname -m
    [  +40 ms] Exit code 0 from: uname -m
    [        ] x86_64
    [   +7 ms] executing: [/home/erayerdin/snap/flutter/common/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
    [   +5 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
    [        ] f1875d570e39de09040c8f79aa13cc56baab8db1
    [        ] executing: [/home/erayerdin/snap/flutter/common/flutter/] git tag --points-at f1875d570e39de09040c8f79aa13cc56baab8db1
    [  +16 ms] Exit code 0 from: git tag --points-at f1875d570e39de09040c8f79aa13cc56baab8db1
    [        ] 3.0.5
    [  +34 ms] executing: [/home/erayerdin/snap/flutter/common/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
    [   +5 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
    [        ] origin/stable
    [        ] executing: [/home/erayerdin/snap/flutter/common/flutter/] git ls-remote --get-url origin
    [   +6 ms] Exit code 0 from: git ls-remote --get-url origin
    [        ] https://github.com/flutter/flutter.git
    [ +132 ms] executing: [/home/erayerdin/snap/flutter/common/flutter/] git rev-parse --abbrev-ref HEAD
    [   +8 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
    [        ] stable
    [  +76 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
    [   +4 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [  +78 ms] executing: /home/erayerdin/.sdks/android/platform-tools/adb devices -l
    [  +45 ms] List of devices attached
               emulator-5554          device product:sdk_gphone_x86_arm model:AOSP_on_IA_Emulator device:generic_x86_arm transport_id:1
    [   +7 ms] /home/erayerdin/.sdks/android/platform-tools/adb -s emulator-5554 shell getprop
    [  +33 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
    [   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
    [   +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [ +160 ms] Skipping pub get: version match.
    [  +83 ms] Generating
    /home/erayerdin/Projects/Tutorial/todos-bloc-freezed/test_app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
    [  +67 ms] ro.hardware = ranchu
    [  +15 ms] Using hardware rendering with device AOSP on IA Emulator. If you notice graphics artifacts, consider enabling software rendering with
               "--enable-software-rendering".
    [  +36 ms] Initializing file store
    [  +15 ms] Skipping target: gen_localizations
    [   +8 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents:
    /home/erayerdin/Projects/Tutorial/todos-bloc-freezed/test_app/.dart_tool/package_config_subset}
    [  +30 ms] gen_dart_plugin_registrant: Complete
    [   +1 ms] Skipping target: _composite
    [   +2 ms] complete
    [   +6 ms] Launching lib/main.dart on AOSP on IA Emulator in debug mode...
    [   +6 ms] /home/erayerdin/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev
    /home/erayerdin/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/snapshots/frontend_server.dart.snapshot --sdk-root
    /home/erayerdin/snap/flutter/common/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names
    --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill /tmp/flutter_tools.MBGKPC/flutter_tool.LAZHWW/app.dill --packages
    /home/erayerdin/Projects/Tutorial/todos-bloc-freezed/test_app/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts
    --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill build/c075001b96339384a97db4862b8ab8db.cache.dill.track.dill
    --enable-experiment=alternative-invalidation-strategy
    [  +15 ms] executing: /home/erayerdin/.sdks/android/platform-tools/adb -s emulator-5554 shell -x logcat -v time -t 1
    [  +18 ms] <- compile package:todos_bloc_freezed_test/main.dart
    [  +35 ms] --------- beginning of main
               08-05 22:16:58.356 I/GnssLocationProvider( 1857): WakeLock released by handleMessage(REPORT_SV_STATUS, 0,
               com.android.server.location.GnssLocationProvider$SvStatusInfo@68f06d5)
    [  +16 ms] executing: /home/erayerdin/.sdks/android/platform-tools/adb version
    [  +25 ms] Android Debug Bridge version 1.0.41
               Version 33.0.2-8557947
               Installed as /home/erayerdin/.sdks/android/platform-tools/adb
    [   +2 ms] executing: /home/erayerdin/.sdks/android/platform-tools/adb start-server
    [   +7 ms] Building APK
    [  +21 ms] Running Gradle task 'assembleDebug'...
    [   +3 ms] Using gradle from /home/erayerdin/Projects/Tutorial/todos-bloc-freezed/test_app/android/gradlew.
    [  +44 ms] executing: /var/lib/snapd/snap/android-studio/123/android-studio/jre/bin/java -version
    [ +106 ms] Exit code 0 from: /var/lib/snapd/snap/android-studio/123/android-studio/jre/bin/java -version
    [        ] openjdk version "11.0.12" 2021-07-20
               OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
               OpenJDK 64-Bit Server VM (build 11.0.12+0-b1504.28-7817840, mixed mode)
    [   +2 ms] executing: [/home/erayerdin/Projects/Tutorial/todos-bloc-freezed/test_app/android/]
    /home/erayerdin/Projects/Tutorial/todos-bloc-freezed/test_app/android/gradlew -Pverbose=true -Ptarget-platform=android-x86
    -Ptarget=/home/erayerdin/Projects/Tutorial/todos-bloc-freezed/test_app/lib/main.dart -Pbase-application-name=android.app.Application
    -Pdart-defines=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ== -Pdart-obfuscation=false -Ptrack-widget-creation=true -Ptree-shake-icons=false
    -Pfilesystem-scheme=org-dartlang-root assembleDebug
    [+1392 ms] FAILURE: Build failed with an exception.
    [   +2 ms] * What went wrong:
    [        ] A problem occurred configuring root project 'android'.
    [        ] > java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to create Jar file
    /home/erayerdin/.gradle/caches/jars-9/d0383b30f0f23913321fcfe971069311/proj.jar.
    [   +4 ms] * Try:
    [        ] > Run with --stacktrace option to get the stack trace.
    [   +1 ms] > Run with --info or --debug option to get more log output.
    [   +2 ms] > Run with --scan to get full insights.
    [        ] * Get more help at https://help.gradle.org
    [  +86 ms] BUİLD FAILED in 1s
    [ +376 ms] Running Gradle task 'assembleDebug'... (completed in 2.006ms)
    [+9047 ms] Exception: Gradle task assembleDebug failed with exit code 1
    [        ] "flutter run" took 11.859ms.
    [   +4 ms] 
               #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
               #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:699:9)
               <asynchronous suspension>
               #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1183:27)
               <asynchronous suspension>
               #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
               <asynchronous suspension>
               #4      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
               <asynchronous suspension>
               #5      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
               <asynchronous suspension>
               #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
               <asynchronous suspension>
               #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
               <asynchronous suspension>
               #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
               <asynchronous suspension>
               #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
               <asynchronous suspension>
               #10     main (package:flutter_tools/executable.dart:94:3)
               <asynchronous suspension>
    [  +79 ms] ensureAnalyticsSent: 77ms
    [   +1 ms] Running shutdown hooks
    [        ] Shutdown hooks complete
    [        ] exiting with code 1
    
    Analyzing test_app...                                                   
    No issues found! (ran in 1.8s)
    
    [✓] Flutter (Channel stable, 3.0.5, on Fedora Linux 36 (KDE Plasma) 5.18.15-200.fc36.x86_64, locale tr_TR.UTF-8)
        • Flutter version 3.0.5 at /home/erayerdin/snap/flutter/common/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision f1875d570e (3 hafta önce), 2022-07-13 11:24:16 -0700
        • Engine revision e85ea0e79c
        • Dart version 2.17.6
        • DevTools version 2.12.2
    [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
        • Android SDK at /home/erayerdin/.sdks/android/
        • Platform android-33, build-tools 33.0.0
        • Java binary at: /var/lib/snapd/snap/android-studio/123/android-studio/jre/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
        • All Android licenses accepted.
    [✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
        ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
    [✓] Linux toolchain - develop for Linux desktop
        • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
        • cmake version 3.10.2
        • ninja version 1.8.2
        • pkg-config version 0.29.1
    [✓] Android Studio (version 2021.2)
        • Android Studio at /var/lib/snapd/snap/android-studio/123/android-studio
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    [✓] VS Code
        • VS Code at /snap/code/current
        • Flutter extension version 3.46.0
    [✓] Connected device (2 available)
        • AOSP on IA Emulator (mobile) • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
        • Linux (desktop)              • linux         • linux-x64   • Fedora Linux 36 (KDE Plasma) 5.18.15-200.fc36.x86_64
    [✓] HTTP Host Availability
        • All required HTTP hosts are available
    ! Doctor found issues in 1 category.