Kanika
Kanika

Reputation: 734

Http request through retrofit returning failure without making the server call

I have a /sample endpoint in my android app. I use Retrofit to make all the network calls. Somehow this endpoint is returning success when called from all other apps except when being called from my app. I debugged through Charles Proxy and no network call is made for this endpoint and the Retrofit error response in failure() is "android retrofit error Failed resolution of Lorg/aspectJ/runtime/reflect/Factory". All the other network calls are going through.

Kindly help. Thanks in advance.

Upvotes: 0

Views: 203

Answers (1)

Rafael Lima
Rafael Lima

Reputation: 3535

The JVM can't find the necessary library to create the Factory for your proxy.

You need to include aspectjrt in your dependency manager.

for maven:

<!-- https://mvnrepository.com/artifact/org.aspectj/aspectjrt -->
<dependency>
    <groupId>org.aspectj</groupId>
    <artifactId>aspectjrt</artifactId>
    <version>1.8.10</version>
</dependency>

Upvotes: 1

Related Questions