Flutter App 无法部署在 Vercel 上:无法下载 https:// <blah blah>/flutter_patched_sdk_product.zip

问题描述 投票:0回答:1

我突然无法将我的 Flutter 应用程序部署到 Vercel。任何帮助将不胜感激,谢谢!

错误信息

Downloading flutter_patched_sdk_product tools...                    29ms
Failed to download https://storage.googleapis.com/flutter_infra_release/flutter/7df127b1ee7d52c4cb0d42eedd00190e2c4ade3d/flutter_patched_sdk_product.zip. Ensure you have network connectivity and then try again.
Exception: 404
Error: Command "if cd flutter; then git pull && cd .. ; else git clone https://github.com/flutter/flutter.git; fi && ls && flutter/bin/flutter doctor && flutter/bin/flutter clean && flutter/bin/flutter config --enable-web" exited with 1

颤动医生

[√] Flutter (Channel beta, 3.28.0-0.1.pre, on Microsoft Windows [Version 10.0.19045.5131], locale en-SG)
    • Flutter version 3.28.0-0.1.pre on channel beta at C:\Users\zyonw\Desktop\flutter_windows_3.7.12-stable\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 3e493a3e4d (10 days ago), 2024-12-12 05:59:24 +0900
    • Engine revision 2ba456fd7f
    • Dart version 3.7.0 (build 3.7.0-209.1.beta)
    • DevTools version 2.41.0

[√] Windows Version (10 Home 64-bit, 22H2, 2009)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\zyonw\AppData\Local\Android\sdk
    • Platform android-35, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.12.3)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.12.35527.113
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2022.2)
    • Android Studio at C:\Program Files\Android\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 17.0.6+0-b2043.56-9586694)

[√] VS Code (version 1.96.2)
    • VS Code at C:\Users\zyonw\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.102.0

[√] Connected device (4 available)
    • SM S918B (mobile) • R5CX346X8LH • android-arm64  • Android 14 (API 34)
    • Windows (desktop) • windows     • windows-x64    • Microsoft Windows [Version 10.0.19045.5131]
    • Chrome (web)      • chrome      • web-javascript • Google Chrome 131.0.6778.109
    • Edge (web)        • edge        • web-javascript • Microsoft Edge 131.0.2903.99

[√] Network resources
    • All expected network resources are available.

我不确定是否需要以下...

设置.gradle.kts

plugins {
    id("dev.flutter.flutter-plugin-loader") version "1.0.0"
    id("com.android.application") version "8.7.0" apply false
    id("org.jetbrains.kotlin.android") version "1.8.22" apply false
}

Gradle 包装属性

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip

我尝试过 flutter clean,pub get。 我尝试清理工作区缓存。

flutter vercel
1个回答
0
投票

我也有同样的问题。我已经尝试了很多方法,但我无法解决它。

© www.soinside.com 2019 - 2024. All rights reserved.