Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29452

fetch SyntaxError: Unexpected token U in JSON at position 0 in react native Android

$
0
0

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.


Viewing all articles
Browse latest Browse all 29452

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>