1

I am unable to send an API request with any library like Axios fetch to a server with released APK in react-native in android pie In debug APK everything is working fine but in released APK not working

I have deployed my server on digital ocean with https protocol and the server is written in flask

my react-native version is 0.59.1 react 16..8.3

android:usesCleartextTraffic="true" in AndroidManifest.xml is also not working

I really need an expert opinion and suggestion that what should I do now it's been one month that I am unable to resolve this

Dharman
  • 30,962
  • 25
  • 85
  • 135

3 Answers3

3

Just change HTTP to HTTPS, Will solve the problem.

Diyako
  • 651
  • 1
  • 9
  • 24
Vipin Vv
  • 131
  • 1
  • 6
0

pass this android:usesCleartextTraffic="true" in application tag in AndroidManifest.xml file it work

-2

/// add this line to android manifest to use http when releasing apk in react native

amit
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 30 '22 at 11:38