簡體   English   中英

需要SDK版本>=2.12.0-0 <3.0.0,版本解析失敗。 (顫振和飛鏢)

[英]requires SDK version >=2.12.0-0 <3.0.0, version solving failed. (Flutter and Dart)

當我嘗試運行顫振應用程序時,我不斷收到此錯誤:

The current Dart SDK version is 2.10.0.                                 
                                                                        
Because flutter_app depends on path >=1.8.0-nullsafety.3 which requires SDK version >=2.12.0-0 <3.0.0, version solving failed.

以下是我正在運行的 Flutter 和 Dart SDK 版本的一些信息:

Flutter 1.22.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision d408d302e2 (1 year, 8 months ago) • 2020-09-29 11:49:17 -0700
Engine • revision 5babba6c4d
Tools • Dart 2.10.0

根據錯誤消息,我嘗試使用 Flutter SDK 2.0.0,因為它是 Dart 2.12.0 附帶的。 但是,然后我收到此錯誤:

Running "flutter pub get" in flutter_app... 19.7s



Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety




FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:transformClassesAndResourcesWithR8ForDevRelease'.
> Could not resolve all task dependencies for configuration ':app:devReleaseRuntimeClasspath'.
> Could not resolve androidx.core:core-ktx:+.
Required by:
project :app > project :audioplayers
> Failed to list versions for androidx.core:core-ktx.
> Unable to load Maven meta-data from https://google.bintray.com/exoplayer/androidx/core/core-ktx/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/exoplayer/androidx/core/core-ktx/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/exoplayer/androidx/core/core-ktx/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

* 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 2m 57s

簡而言之,Flutter 1.22.X 似乎與我的項目兼容,但它附帶的 Dart SDK(2.10.0)不兼容。 但是如果我將我的 Flutter SDK 升級到包含兼容的 Dart SDK 的版本,那么我的 Flutter SDK 將不再兼容! 無論哪種方式,我都會遇到問題。 任何幫助表示贊賞!

You need flutter sdk 1.22.0 to 1.22.6 work for you.

在此處輸入圖像描述

並非每次最新的 sdk 都使用某些項目制作的舊版本。

快樂的富爾特......

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM