Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

714
Visualizações
Android app crashes after integrating React Native with NoClassDefFoundError: com.facebook.react.bridge.JSPackagerWebSocketClient

I integrated React Native into an existing Android project. The code compiles fine, but when I get to the part of my app that initializes React Native, the app crashes.

Relevant part of the backtrace:

java.lang.RuntimeException: Requested enabled DevSupportManager, but DevSupportManagerImpl class was not found or could not be created
      Caused by: java.lang.RuntimeException: Requested enabled DevSupportManager, but DevSupportManagerImpl class was not found or could not be created
        at com.facebook.react.devsupport.DevSupportManagerFactory.create(DevSupportManagerFactory.java:77)
      Caused by: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Constructor.newInstance(Native Method)
        at com.facebook.react.devsupport.DevSupportManagerFactory.create(DevSupportManagerFactory.java:70)
      Caused by: java.lang.NoClassDefFoundError: com.facebook.react.bridge.JSPackagerWebSocketClient
        at com.facebook.react.devsupport.DevServerHelper.<init>(DevServerHelper.java:108)
        at com.facebook.react.devsupport.DevSupportManagerImpl.<init>(DevSupportManagerImpl.java:141)

The key part is

java.lang.NoClassDefFoundError: com.facebook.react.bridge.JSPackagerWebSocketClient.

I'm not sure why this class wouldn't be found. The location where this crash happens in the React Native source code is here.

UPDATE: If it's relevant, I was getting compile-time errors before this that I fixed with the solution here (which excludes okhttp-ws) which I wonder may be causing this.

UPDATE 2: I'm starting to think this is related to excluding okhttp-ws since I noticed in JSPackagerWebSocketClient.java there are imports such as:

import okhttp3.ws.WebSocket;

So I guess the real question is what is the real fix for the original issue I was having, which is:

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: okhttp3/internal/ws/RealWebSocket$1.class

I'm using React Native v0.31.0.

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I get that error sometimes when I previously had "Debug JS Remotely" enabled, in the debug menu, when I run my project.

First, close the previous web browser tab that the app was connected to, and then in the app dismiss the error then disable "Debug JS Remotely" and reload.

This is 1 solution to my described common JSPackagerWebSocketClient error, but I am unsure of all your conditions around your issue though, such as your integration process, your android configs, how you ran the app, or maybe it's an issue with an older RN version.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda