React-native Cannot Find Symbol After Upgrade To 0.60
Solution 1:
I actually missed a few tiny things when using the same page as you did when I migrated from 0.59.10 to 0.60.0.
One of the things I missed (which I could pinpoint was the problem in my case eventually) was that this section had to be added in the bottom of /android/app/build.gradle
:
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
I only had the similar line it in /android/settings.gradle
but missed that one.
There are other reasons why this might be happening too. Following are GitHub issues I found while trying to fix my project:
- https://github.com/facebook/react-native/issues/9296: Clear the IDE caches and restart; didn't apply in my case but might do in yours.
https://github.com/facebook/react-native/issues/22033 Two solutions proposed:
Make sure
maven { url("$rootDir/../node_modules/react-native/android") }
is in yourallProjects.repositories
in/android/build.gradle
Explicitly set your react-native dependency to the version you use. So in
/android/app/build.gradle
in thedependencies
section, you should find an entrycompile "com.facebook.react:react-native:+
. You can change that tocompile "com.facebook.react:react-native:0.60.0
. In some cases gradle used an old version of the library because it was referenced by some JavaScript dependency. This change should override that.
Post a Comment for "React-native Cannot Find Symbol After Upgrade To 0.60"