Reputation: 725
After flutter upgrade flutter to newest stable version I can't debug in android simulator. I get the following error:
Launching lib/main.dart on sdk gphone x86 in debug mode...
lib/main.dart:1 ../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_webservice-0.0.19/lib/src/utils.dart:61:27: Error: The argument type 'String' can't be assigned to the parameter type 'Uri'.
FAILURE: Build failed with an exception.
Where: Script '/Users/michael/Documents/Developer/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 991
What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command '/Users/michael/Documents/Developer/flutter/bin/flutter'' finished with non-zero exit value 1
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 33s Exception: Gradle task assembleDebug failed with exit code 1
Upvotes: 1
Views: 4476
Reputation: 2329
i had the same issue, but after i move the folders to android studio projects folder it worked fine
Upvotes: 0
Reputation: 318
Author of google_maps_webservice plugin (https://pub.dev/packages/google_maps_webservice) does not release flutter 2.0.2 compatible version yet. You can switch to 0.0.20-nullsafety.2 version (https://pub.dev/packages/google_maps_webservice/versions/0.0.20-nullsafety.2)
add explicitly
google_maps_webservice: ^0.0.20-nullsafety.2
to dependencies in pubspec.yaml
Update the compileSdkVersion to 30 in my app/build.gradle
do not forget run:
flutter clean
flutter pub get
Upvotes: 4