close
Exception thrown while unbinding, java.lang.IllegalArgumentException: Service not registered in Flutter, Exception thrown while unbinding, java.lang.IllegalArgumentException: Service not registered

[Solved] Exception thrown while unbinding, java.lang.IllegalArgumentException: Service not registered in Flutter

Hello Guys How are you all ? Hope You all Are Fine. Recently I Faced Exception thrown while unbinding, java.lang.IllegalArgumentException: Service not registered Error In Flutter. As this error in a flutter. Here I come with all possible solutions for this error.

we are providing you all possible solutions to solve this error. let’s start this article without wasting your time.

How Exception thrown while unbinding, java.lang.IllegalArgumentException: Service not registered Error Occurs ?

I am Using FireBase service in my app Like firestore, firebase core, analytics, and firebase messaging. App Was Run Perfectly suddenly I My debug console show me this:

W/ConnectionTracker(17934): Exception thrown while unbinding
W/ConnectionTracker(17934): java.lang.IllegalArgumentException: Service not registered: [email protected]
W/ConnectionTracker(17934):     at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1557)
W/ConnectionTracker(17934):     at android.app.ContextImpl.unbindService(ContextImpl.java:1692)
W/ConnectionTracker(17934):     at android.content.ContextWrapper.unbindService(ContextWrapper.java:717)
W/ConnectionTracker(17934):     at ci.f(:[email protected]@20.42.15 (100408-0):1)
W/ConnectionTracker(17934):     at ci.d(:[email protected]@20.42.15 (100408-0):2)
W/ConnectionTracker(17934):     at lq.D(:[email protected]@20.42.15 (100408-0):10)
W/ConnectionTracker(17934):     at lc.a(:com.google.android.g[email protected]@20.42.15 (100408-0):2)

How to Solve Exception thrown while unbinding, java.lang.IllegalArgumentException: Service not registered In Flutter ?

  1. How to solve Exception thrown while unbinding,java.lang.IllegalArgumentException: Service not registered in flutter ?

    to solve Exception thrown while unbinding,java.lang.IllegalArgumentException: Service not registered in flutter This Error Occurs By Firebase. While implementing Firebase you have to follow all step carefully. As per latest Firebase Documentation Follow all below step to solve this error.

  2. Exception thrown while unbinding,java.lang.IllegalArgumentException: Service not registered in flutter

    to solve Exception thrown while unbinding,java.lang.IllegalArgumentException: Service not registered in flutter This Error Occurs By Firebase. While implementing Firebase you have to follow all step carefully. As per latest Firebase Documentation Follow all below step to solve this error.

Solution 1

Its Firebase Error. Just follow below step.

  1. Open Your Project android/app/build.gradle File.
  2. Add Below Two lines in build.gradle file.
  3. Flutter Clean.
  4. Flutter Run.

Add the following to your android\app\build.gradle. This Solution worked for me.

implementation 'com.google.android.gms:play-services-base:17.5.0'
implementation 'com.google.firebase:firebase-analytics:18.0.0'

Solution 2

I Think You doesn’t configure firebase correctly. As Per Latest Firebase documentation saying:

// Add this line
apply plugin: 'com.google.gms.google-services'

dependencies {
    ...
    // Import the Firebase BoM
    implementation platform('com.google.firebase:firebase-bom:26.4.0')

    // Add the dependency for the Firebase SDK for Google Analytics
    // When using the BoM, don't specify versions in Firebase dependencies
    implementation 'com.google.firebase:firebase-analytics-ktx'

    // Add the dependencies for any other desired Firebase products
    // https://firebase.google.com/docs/android/setup#available-libraries
}

After adding firebase-analytics-ktx the error will be solved.

Summery

So it’s all About All possible solutions. Hope this above all solution helped you a lot. Comment below Your thoughts and your queries. Comment Below on your suggestion.

Check Out Below Article

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *