skip to Main Content

FATAL EXCEPTION: main
Process: com.example.near_by_api_ex, PID: 10222
java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.nearby.connection.ConnectionsClient, but class was expected (declaration of ‘com.google.android.gms.nearby.connection.ConnectionsClient’ appears in /data/app/com.example.near_by_api_ex-SQmqvcjOXV3emcH2l_ILUw==/base.apk)

2

Answers


  1. There have been some changes in Google’s API & versions which are used in Flutter Location Package. We need to wait until they reflect those compatible changes in the package.

    PR for that issue:
    https://github.com/Lyokone/flutterlocation/pull/803

    There’s a workaround for that. I forked the repo & used it in pubspec but this change is not working in my project.
    https://github.com/Lyokone/flutterlocation/issues/802#issuecomment-1408420419

    Login or Signup to reply.
  2. Solution Very Easy

    1. Open The Project into the Android Studio
    2. Location pub library and geolocator pub libary
      same
      implementation ‘com.google.android.gms:play-services-location:21.0.1’

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search