StethoInterceptor does not work after dagger hilt

159 Views Asked by At

we use StethoInterceptor lone time, but it seems does not work after hilt refactoring the device exists inchrome://inspec but the network tab is empty

 @Singleton
        @Provides
        fun provideRetrofit(okHttpClient: OkHttpClient): Retrofit = Retrofit.Builder()
                .baseUrl(RetrofitClientInstance.baseUrl)
                .client(okHttpClient)
                .addConverterFactory(GsonConverterFactory.create())
                .build()
    
        @Singleton
        @Provides
        fun provideOkHttpClient(): OkHttpClient =
                        OkHttpClient.Builder()
                        .protocols(listOf(Protocol.HTTP_1_1, Protocol.HTTP_2))
                        .addInterceptor(loggingInterceptor())
                        .connectTimeout(2, TimeUnit.MINUTES)
                        .writeTimeout(2, TimeUnit.MINUTES) // write timeout
                        .readTimeout(2, TimeUnit.MINUTES) // read timeout
                        .addInterceptor(TokenExpireInterceptor())
                        .addInterceptor(TokenAuthenticatorInterceptor())
                        .addInterceptor(RequestLoggingInterceptor())
                        .addNetworkInterceptor(StethoInterceptor())
                        .retryOnConnectionFailure(true)
                        .build()
0

There are 0 best solutions below