flutter-geocoding
                                
                                
                                
                                    flutter-geocoding copied to clipboard
                            
                            
                            
                        Build failed after upgrading to 2.0.5
🐛 Bug Report
Hi friends, After I upgraded to new version (2.0.5) from last version (2.0.4) my builds failed:
FAILURE: Build failed with an exception.
- What went wrong: A problem occurred configuring project ':geocoding'.
 
Could not resolve all artifacts for configuration ':geocoding:classpath'. Could not find protos-27.2.2.jar (com.android.tools.analytics-library:protos:27.2.2). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/27.2.2/protos-27.2.2.jar Failed to notify project evaluation listener. Could not get unknown property 'android' for project ':geocoding' of type org.gradle.api.Project. Could not get unknown property 'android' for project ':geocoding' of type org.gradle.api.Project.
- 
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 7s Exception: Gradle task assembleDevelopmentDebug failed with exit code 1
flutter doctor output:
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.0.5, on Microsoft Windows [Version 10.0.25182.1010], locale en-US) Checking Android licenses is taking an unexpectedly long time...[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [✓] Chrome - develop for the web [✓] Visual Studio - develop for Windows (Visual Studio Community 2022 17.0.2) [✓] Android Studio (version 2021.2) [✓] VS Code (version 1.70.2) [✓] Connected device (4 available) [✓] HTTP Host Availability
• No issues found!
Project environment:
sdk: ">=2.17.6 <3.0.0"
compileSdkVersion 33 classpath 'com.android.tools.build:gradle:4.1.0' distributionUrl=https://services.gradle.org/distributions/gradle-6.7-all.zip
Version: 2.0.5
Platform:
- [ ] :iphone: iOS
 - [x] :robot: Android
 
Similarly same here sdk: ">=2.12.0 <3.0.0"
compileSdkVersion 31 classpath 'com.android.tools.build:gradle:4.2.0' distributionUrl=https://services.gradle.org/distributions/gradle-6.9-all.zip
.../flutter/.pub-cache/hosted/pub.dartlang.org/geocoding-2.0.5/android/src/main/java/com/baseflow/geocoding/MethodCallHandlerImpl.java:65: error: cannot find symbol
        final BinaryMessenger.TaskQueue taskQueue = messenger.makeBackgroundTaskQueue();
                             ^
  symbol:   class TaskQueue
  location: interface BinaryMessenger
.../flutter/.pub-cache/hosted/pub.dartlang.org/geocoding-2.0.5/android/src/main/java/com/baseflow/geocoding/MethodCallHandlerImpl.java:65: error: cannot find symbol
        final BinaryMessenger.TaskQueue taskQueue = messenger.makeBackgroundTaskQueue();
                                                             ^
  symbol:   method makeBackgroundTaskQueue()
  location: variable messenger of type BinaryMessenger
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':geocoding:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
                                    
                                    
                                    
                                
same issue, how to solve it?
@AzharRaeisi, your issue is either caused by an outdated Flutter version or because you are compiling against compileSdkVersion 31. Make sure to compile against the latest SDK version by updating the compileSdkVersion to 33 in your android/app/build.gradle file. Also make sure you are using the latest flutter version.
@resfandiari try updating the Android Gradle plugin build tools to version 4.2.0 by updating the classpath 'com.android.tools.build:gradle:4.1.0' to classpath 'com.android.tools.build:gradle:4.2.0'.
Let me know if this helps.
Without additional information, we are unfortunately not able to resolve this issue. Therefore, we reluctantly closed this issue for now. If you run into this issue later, feel free to file a new issue with a reference to this issue. Add a description of detailed steps to reproduce, expected and current behaviour, logs and the output of 'flutter doctor -v'. Thanks for your contribution.