Skip to main content
Answered

How to update to more recent Android SDK versions? Getting Glide IllegalStateException


  • New Participant
  • 3 replies

After updating to more recent versions from 7.1.0, we are getting:

 

Caused by: java.lang.IllegalStateException: You cannot call Glide.get() in registerComponents(), use the provided Glide instance instead

    at io.intercom.com.bumptech.glide.Glide.checkAndInitializeGlide(Glide.java:172)

    at io.intercom.com.bumptech.glide.Glide.get(Glide.java:160)

    at io.intercom.com.bumptech.glide.Glide.getRetriever(Glide.java:612)

    at io.intercom.com.bumptech.glide.Glide.with(Glide.java:638)

    at io.intercom.android.sdk.Injector.getOverlayPresenter(Injector.java:220)

    at io.intercom.android.sdk.RealIntercom.create(RealIntercom.java:78)

    at io.intercom.android.sdk.Intercom.initialize(Intercom.java:69)

    at me.sphere.app.data.interactors.IntercomInteractorImpl.initIntercom(IntercomInteractor.kt:24)

    at me.sphere.app.data.interactors.IntercomInteractorImpl.logEvent(IntercomInteractor.kt:41)

 

Our application has no dependencies to Glide.

Best answer by Lisa B11

Hey @attila​ 👋

 

In version 8.0.0 of our Android SDK we have updated to use OkHttp 4. OkHttp 4 requires we compile with Java 8. This means you will need to update to Java 8 before using the newest version of our SDK. You can follow the instructions here.

 

Can you try that and let me know how it goes?

View original
Did this topic help you find an answer to your question?

4 replies

Forum|alt.badge.img+5
  • Employee
  • 250 replies
  • Answer
  • October 20, 2020

Hey @attila​ 👋

 

In version 8.0.0 of our Android SDK we have updated to use OkHttp 4. OkHttp 4 requires we compile with Java 8. This means you will need to update to Java 8 before using the newest version of our SDK. You can follow the instructions here.

 

Can you try that and let me know how it goes?


  • Author
  • New Participant
  • 3 replies
  • October 21, 2020

Interesting we are already using okHttp 4.2.2 & compile with Java 8.

 

Will dig into details some more, to see where the issue might be coming from.


  • Author
  • New Participant
  • 3 replies
  • November 15, 2020

We are still seeing the same issue on the latest Android SDK release 8.3.0

 

Caused by: java.lang.IllegalStateException: You cannot call Glide.get() in registerComponents(), use the provided Glide instance instead

    at io.intercom.com.bumptech.glide.Glide.checkAndInitializeGlide(Glide.java:172)

    at io.intercom.com.bumptech.glide.Glide.get(Glide.java:160)

    at io.intercom.com.bumptech.glide.Glide.getRetriever(Glide.java:612)

    at io.intercom.com.bumptech.glide.Glide.with(Glide.java:638)

    at io.intercom.android.sdk.Injector.getOverlayPresenter(Injector.java:220)

    at io.intercom.android.sdk.RealIntercom.create(RealIntercom.java:81)

    at io.intercom.android.sdk.Intercom.initialize(Intercom.java:69)

    at me.sphere.app.data.interactors.IntercomInteractorImpl.initIntercom(IntercomInteractor.kt:27)

    at me.sphere.app.data.interactors.IntercomInteractorImpl.logEvent(IntercomInteractor.kt:42)

 

As mentioned before we don't have dependency on Glide.

Since this is a runtime crash, I don't think OkHttp 4 / Java 8 would have anything to do with this, compilation should fail in that case.


  • Author
  • New Participant
  • 3 replies
  • November 18, 2020

We have resolved the issue successfully.

 

The initialisation code Intercom.init ... was executed on a computation thread.

Moving it to main thread resolved the issue. (following the SDK integration guide this should not be an issue.)


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings