react-nativereact-native-linking

React Native - getting error when running command "react-native unlink"


After upgrading past react-native 0.60.....Im being warned that I should unlink all the 3rd party libraries that were linked manually (as RN now takes care of it via auto-linking).

However when I run react-native unlink <depedency> I get the error Something went wrong while unlinking. Reason Expected [\n\r] but end of input found

Any ideas?


Solution

  • The Reason is, that in one of your files, the blanc-line at the end of the file is missing.

    Please check following files for this empty line:

    You also might unlink your modules manually like this:

    Open android/settings.gradle, remove the include & project Lines

    After cleanup, the file should look like this:

    rootProject.name = 'MyBeautifullApp'
    apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
    include ':app'