I am using fetch for a "https" GET request it works fine in IOS but throws SyntaxError: Unexpected token U in JSON at position 0 error in android. when i checked the status it was " status 401 ", i even checked the grade of my domain its "A" grade.
this is my build.gradle
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
my react and react native versions are below
"react": "16.9.0",
"react-native": "0.61.4"
I even tried to add the below code in my AndroidManifes.xml file.
android:usesCleartextTraffic="true" tools:targetApi="28"
I tried everything but i dont exactly know what's the issue, Please help thanks.