Reputation: 58742
I am trying to run a flutter app on dev channel. Which gives the below error. But some other applications works fine. Is there any configuration needed for an existing app to work on dev channel, beside API compatibility. See the output of flutter doctor etc below. I tried running again after flutter clean
but same result.
Edit: look like an android specific issue, as it build and run fine on IOS simulator! Edit 2: It also works from Android Studio, but not through vscode / command line (flutter run)
flutter run --debug
Using hardware rendering with device Android SDK built for x86. If you
get graphics artifacts, consider enabling software rendering with
"--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle... 1.3s
Resolving dependencies... 1.7s
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugKotlin'.
> Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
> Could not find io.flutter:x86_release:1.0.0-1d62160fdb2f5a1d20f1dccb761a2caa96804c22.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/io/flutter/x86_release/1.0.0-1d62160fdb2f5a1d20f1dccb761a2caa96804c22/x86_release-1.0.0-1d62160fdb2f5a1d20f1dccb761a2caa96804c22.pom
- https://dl.google.com/dl/android/maven2/io/flutter/x86_release/1.0.0-1d62160fdb2f5a1d20f1dccb761a2caa96804c22/x86_release-1.0.0-1d62160fdb2f5a1d20f1dccb761a2caa96804c22.jar
- https://jcenter.bintray.com/io/flutter/x86_release/1.0.0-1d62160fdb2f5a1d20f1dccb761a2caa96804c22/x86_release-1.0.0-1d62160fdb2f5a1d20f1dccb761a2caa96804c22.pom
- https://jcenter.bintray.com/io/flutter/x86_release/1.0.0-1d62160fdb2f5a1d20f1dccb761a2caa96804c22/x86_release-1.0.0-1d62160fdb2f5a1d20f1dccb761a2caa96804c22.jar
- http://download.flutter.io/io/flutter/x86_release/1.0.0-1d62160fdb2f5a1d20f1dccb761a2caa96804c22/x86_release-1.0.0-1d62160fdb2f5a1d20f1dccb761a2caa96804c22.pom
- http://download.flutter.io/io/flutter/x86_release/1.0.0-1d62160fdb2f5a1d20f1dccb761a2caa96804c22/x86_release-1.0.0-1d62160fdb2f5a1d20f1dccb761a2caa96804c22.jar
Required by:
project :app
* 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 14s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 15.3s
Gradle task assembleDebug failed with exit code 1
$ flutter channel
Flutter channels:
beta
* dev
master
stable
$ flutter upgrade
Upgrading Flutter from /Users/.../sdk/flutter...
Already up to date.
Upgrading engine...
Downloading Android Maven dependencies... 1.4s
Flutter 1.10.14 • channel dev • https://github.com/flutter/flutter.git
Framework • revision 1946fc4da0 (3 weeks ago) • 2019-10-07 15:23:31 -0700
Engine • revision 1d62160fdb
Tools • Dart 2.6.0 (build 2.6.0-dev.1.0 d6c6d12ebf)
Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, v1.10.14, on Mac OS X 10.15 19A602, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
[✓] Android Studio (version 3.5)
[✓] Android Studio
[✓] VS Code (version 1.39.2)
[✓] Connected device (1 available)
• No issues found!
Upvotes: 6
Views: 1678
Reputation: 58742
The mystery of why it work at Android Studio & IOS but not VSCode is due to that both uses different dart & flutter SDK, and packages/dependencies. This is because the editor plugin uses its own sdk and cache. So, configuring it all to point to same sdk solved the issue.
Upvotes: 2