Home › Build error fixes › Android / Gradle

Autolinking got text that is not JSON

Android / Gradle · last reviewed 2026-11-10

The error looks like this

groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object

Why it happens

Gradle runs a node command to list native modules and expects JSON. Something printed extra text first: a warning, a console.log in react-native.config.js, or the wrong node version.

How to fix it

  1. Run it yourself and look at the output: npx react-native config (Expo: npx expo-modules-autolinking resolve)
  2. Remove whatever prints before the JSON — often a console.log or a deprecation warning.
  3. Check node -v matches the version your React Native needs.

Not sure this is your error? Let ReleaseMedic read the whole log

Build logs are long and the last line is rarely the real cause. ReleaseMedic finds the first real error, explains it and gives the steps — free, and the log never leaves your computer.

$ npx releasemedic log build.log

Or pipe a build straight in: cd android && ./gradlew bundleRelease 2>&1 | npx releasemedic log -

Catch it before you build

Most release errors come from project settings you can check in seconds — signing, SDK levels, privacy manifests, permissions, push and login setup.

$ npx releasemedic

Related Android / Gradle errors