我不知道如何处理这个问题了。没有关于此问题的良好文档。
我已经尝试将 gradle 升级到最新版本以及升级构建工具等。有些人甚至让我跑步flutter doctor --android-licenses
,我做到了,但没有用。
错误:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
> Could not resolve com.google.zxing:core:{strictly 3.3.0}.
Required by:
project :app
> Cannot find a version of 'com.google.zxing:core' that satisfies the version constraints:
Dependency path 'android:app:unspecified' --> 'com.facebook.android:facebook-android-sdk:8.2.0' --> 'com.facebook.android:facebook-common:8.2.0' --> 'com.google.zxing:core:3.3.3'
Constraint path 'android:app:unspecified' --> 'com.google.zxing:core:{strictly 3.3.0}' because of the following reason: debugRuntimeClasspath uses version 3.3.0
> Could not resolve com.google.zxing:core:3.3.3.
Required by:
project :app > com.facebook.android:facebook-android-sdk:8.2.0 > com.facebook.android:facebook-common:8.2.0
> Cannot find a version of 'com.google.zxing:core' that satisfies the version constraints:
Dependency path 'android:app:unspecified' --> 'com.facebook.android:facebook-android-sdk:8.2.0' --> 'com.facebook.android:facebook-common:8.2.0' --> 'com.google.zxing:core:3.3.3'
Constraint path 'android:app:unspecified' --> 'com.google.zxing:core:{strictly 3.3.0}' because of the following reason: debugRuntimeClasspath uses version 3.3.0
Flutter Doctor 对我的评价
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.22.4, on Microsoft Windows [Version 10.0.19042.1348], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[!] Android Studio (version 4.1.0)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
X Unable to determine bundled Java version.
[√] VS Code (version 1.63.0)
[√] Connected device (1 available)
PS 我已经安装了 Flutter 和 Dart 插件。不知道为什么它仍然被列为未安装。我的电脑也重启了好几次。我也不知道为什么它不能确定捆绑 Java 版本。