You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had an issue building a Flutter project for Android where this library is a transitive dependency. After investigating a few leads, I discovered that this project does not build with the default generated Flutter app.
I created a new Flutter project like so:
flutter create new_android
Creating project new_android...
Resolving dependencies in `new_android`...
Downloading packages...
Got dependencies in `new_android`.
Wrote 129 files.
All done!
You can find general documentation for Flutter at: https://docs.flutter.dev/
Detailed API documentation is available at: https://api.flutter.dev/
If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev
In order to run your application, type:
$ cd new_android
$ flutter run
Your application code is in new_android/lib/main.dart.
I then ran the default app from Android Studio on my phone. Works.
At this point I attempted to run the app again, and this is the output I got:
Resolving dependencies...
Downloading packages...
collection 1.18.0 (1.19.0 available)
flutter_lints 3.0.2 (4.0.0 available)
leak_tracker 10.0.4 (10.0.5 available)
leak_tracker_flutter_testing 3.0.3 (3.0.5 available)
lints 3.0.0 (4.0.0 available)
material_color_utilities 0.8.0 (0.12.0 available)
meta 1.12.0 (1.15.0 available)
string_scanner 1.2.0 (1.3.0 available)
test_api 0.7.0 (0.7.3 available)
vm_service 14.2.1 (14.2.4 available)
Got dependencies!
10 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Launching lib/main.dart on ASUS AI2202 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/kaarel/.pub-cache/hosted/pub.dev/ua_client_hints-1.3.1/android/build.gradle' line: 46
* What went wrong:
A problem occurred evaluating project ':ua_client_hints'.
> Could not find method jvmToolchain() for arguments [17] on extension 'kotlin' of type org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension.
* 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 828ms
Error: Gradle task assembleDebug failed with exit code 1
Hi.
I had an issue building a Flutter project for Android where this library is a transitive dependency. After investigating a few leads, I discovered that this project does not build with the default generated Flutter app.
I created a new Flutter project like so:
I then ran the default app from Android Studio on my phone. Works.
Then I added this library:
At this point I attempted to run the app again, and this is the output I got:
Further information on the Flutter version:
Is there any changes I can make to my gradle settings that would resolve this?
The text was updated successfully, but these errors were encountered: