flutter_geocoder icon indicating copy to clipboard operation
flutter_geocoder copied to clipboard

flutter_geocoder has been deprecated, need to update as per latest flutter version

Open kamleshwebtech opened this issue 4 years ago • 19 comments

Getting below error in console panel:

The plugins `flutter_geocoder` use a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if these plugins support the Android V2 embedding. Otherwise, consider removing them since a future release of Flutter will remove these deprecated APIs.

Need to update flutter_geocoder plugin as per latest flutter version. Thanks.

kamleshwebtech avatar Sep 01 '21 08:09 kamleshwebtech

Getting below error in console panel:

The plugins `flutter_geocoder` use a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if these plugins support the Android V2 embedding. Otherwise, consider removing them since a future release of Flutter will remove these deprecated APIs.

Need to update flutter_geocoder plugin as per latest flutter version. Thanks.

Please use this repo => https://github.com/nguyenxdat/flutter_geocoder

nguyenxdat avatar Sep 13 '21 14:09 nguyenxdat

Getting below error in console panel:

The plugins `flutter_geocoder` use a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if these plugins support the Android V2 embedding. Otherwise, consider removing them since a future release of Flutter will remove these deprecated APIs.

Need to update flutter_geocoder plugin as per latest flutter version. Thanks.

Please use this repo => https://github.com/nguyenxdat/flutter_geocoder

How do I call this on my pubspec ?

zakblacki avatar Sep 16 '21 19:09 zakblacki

Getting below error in console panel:

The plugins `flutter_geocoder` use a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if these plugins support the Android V2 embedding. Otherwise, consider removing them since a future release of Flutter will remove these deprecated APIs.

Need to update flutter_geocoder plugin as per latest flutter version. Thanks.

Please use this repo => https://github.com/nguyenxdat/flutter_geocoder

How do I call this on my pubspec ?

Use this

geocoder: git: url: https://github.com/nguyenxdat/flutter_geocoder.git ref: master

nguyenxdat avatar Sep 17 '21 03:09 nguyenxdat

Unfortunately though it does fix the warning it does not work as intended so I wouldn't recommend this

zakblacki avatar Sep 21 '21 01:09 zakblacki

@zakblacki are you getting these errors?

/Users/alex/.pub-cache/git/flutter_geocoder-07a69e6a28e3dda194e5239e378e1ba960bfba95/android/src/main/java/com/aloisdeniel/geocoder/GeocoderPlugin.java:87: error: lambda expressions are not supported in -source 1.7
                    () -> methodResult.success(result));
                       ^
  (use -source 8 or higher to enable lambda expressions)

/Users/alex/.pub-cache/git/flutter_geocoder-07a69e6a28e3dda194e5239e378e1ba960bfba95/android/src/main/java/com/aloisdeniel/geocoder/GeocoderPlugin.java:100: error: method references are not supported in -source 1.7
                    methodResult::notImplemented);
                                  ^
  (use -source 8 or higher to enable method references)
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':geocoder:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

AleksandarSavic95 avatar Sep 22 '21 12:09 AleksandarSavic95

Unfortunately though it does fix the warning it does not work as intended so I wouldn't recommend this

Sorry my mistake. I pushed new code and it's work

nguyenxdat avatar Sep 24 '21 03:09 nguyenxdat

@zakblacki are you getting these errors?

/Users/alex/.pub-cache/git/flutter_geocoder-07a69e6a28e3dda194e5239e378e1ba960bfba95/android/src/main/java/com/aloisdeniel/geocoder/GeocoderPlugin.java:87: error: lambda expressions are not supported in -source 1.7
                    () -> methodResult.success(result));
                       ^
  (use -source 8 or higher to enable lambda expressions)

/Users/alex/.pub-cache/git/flutter_geocoder-07a69e6a28e3dda194e5239e378e1ba960bfba95/android/src/main/java/com/aloisdeniel/geocoder/GeocoderPlugin.java:100: error: method references are not supported in -source 1.7
                    methodResult::notImplemented);
                                  ^
  (use -source 8 or higher to enable method references)
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':geocoder:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

You should use java version 8 and above

nguyenxdat avatar Sep 24 '21 03:09 nguyenxdat

Yes thank you it's working as expected !

zakblacki avatar Sep 25 '21 14:09 zakblacki

You should use java version 8 and above

Where should I update java to version 8? @nguyenxdat

AleksandarSavic95 avatar Sep 29 '21 09:09 AleksandarSavic95

You should use java version 8 and above

Where should I update java to version 8? @nguyenxdat

on your build.gradle app put jdk8 instead of 7 also update your java on ide settings

zakblacki avatar Sep 29 '21 17:09 zakblacki

Thanks, will try next week, with some other package updates :))

AleksandarSavic95 avatar Sep 30 '21 08:09 AleksandarSavic95

I have added below lines in gradle compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } But still getting same error of lambda expression. @nguyenxdat

krupa-inheritx avatar Oct 04 '21 12:10 krupa-inheritx

I have added below lines in gradle compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } But still getting same error of lambda expression. @nguyenxdat

Check java version in your PC

nguyenxdat avatar Oct 06 '21 07:10 nguyenxdat

I have Java 11 installed in my PC @nguyenxdat

krupa-inheritx avatar Oct 06 '21 08:10 krupa-inheritx

After updating flutter to 2.5.2 version getting the below error:

The plugin geocoder uses a deprecated version of the Android embedding. To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs. If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

Please update the package according to the new flutter version. It will be really helpful.

TharaniP avatar Oct 14 '21 16:10 TharaniP

Getting below error in console panel:

The plugins `flutter_geocoder` use a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if these plugins support the Android V2 embedding. Otherwise, consider removing them since a future release of Flutter will remove these deprecated APIs.

Need to update flutter_geocoder plugin as per latest flutter version. Thanks.

Please use this repo => https://github.com/nguyenxdat/flutter_geocoder

How do I call this on my pubspec ?

Use this

geocoder: git: url: https://github.com/nguyenxdat/flutter_geocoder.git ref: master

Please consider adding it as on pub.dev if this does not get any more update

zakblacki avatar Oct 16 '21 00:10 zakblacki

just a comment to fix the java compatibility problem, I needed to edit the android build.gradle of the @nguyenxdat fork, not in my own project. @nguyenxdat it would be nice if you added this commit to your project.

klivin avatar Oct 27 '21 23:10 klivin

I have new commit, please change from geocoder: git: url: https://github.com/nguyenxdat/flutter_geocoder.git ref: master to geocoder: git: url: https://github.com/nguyenxdat/flutter_geocoder.git ref: 443b875d8ec80ce525cc6e8f17dfbbbbe7fa3028

nguyenxdat avatar Oct 29 '21 03:10 nguyenxdat

Hi @nguyenxdat This seems to be working Is there a reason why you havent published a package on pub dev instead of us forking considering that this package hasnt been updated for almost a year

ShivamMattoo33 avatar Dec 13 '21 16:12 ShivamMattoo33