-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Native 0.62.0 Cannot find symbol error (Android) #104
Comments
this issue is fixed by changing the following file in the package In ThreadBaseReactPackage.java file change the following The first two errors are fixed by changing the timing modal to TimingModule of react. From: To: next bug fixed by passing react instance to DevSettingsModule From: To: Please fix these things in your module, So that it will not give error for people using RN 0.62.0 |
package com.reactlibrary; import com.facebook.react.ReactInstanceManager; import java.util.ArrayList; public class ThreadBaseReactPackage implements ReactPackage {
} |
When your code is compiled, the compiler needs to work out what each and every identifier in your code means. As the compiler is going through the code it will find something and know what to do with it or not. Your Cannot find symbol error relates to the identifiers and means that Java cannot figure out what the "symbol" means. The general causes for a Cannot find symbol error are things like:
|
@linehammer |
/Users/streakui/streak_crypto_app/node_modules/react-native-threads/android/src/main/java/com/reactlibrary/ThreadBaseReactPackage.java:10: error: cannot find symbol
import com.facebook.react.modules.core.Timing;
^
symbol: class Timing
location: package com.facebook.react.modules.core
/Users/streakui/streak_crypto_app/node_modules/react-native-threads/android/src/main/java/com/reactlibrary/ThreadBaseReactPackage.java:40: error: cannot find symbol
new Timing(catalystApplicationContext, reactInstanceManager.getDevSupportManager()),
^
symbol: class Timing
location: class ThreadBaseReactPackage
/Users/streakui/streak_crypto_app/node_modules/react-native-threads/android/src/main/java/com/reactlibrary/ThreadBaseReactPackage.java:52: error: constructor DevSettingsModule in class DevSettingsModule cannot be applied to given types;
new DevSettingsModule(reactInstanceManager.getDevSupportManager())
^
required: ReactApplicationContext,DevSupportManager
found: DevSupportManager
reason: actual and formal argument lists differ in length
3 errors
3 warnings
FAILURE: Build failed with an exception.
Execution failed for task ':react-native-threads:compileDebugJavaWithJavac'.
In android while building the app I am facing the above issue.
minSdkVersion = 21
compileSdkVersion = 28
targetSdkVersion = 28
react native version = 0.62.0
react version = 16.9.0
The text was updated successfully, but these errors were encountered: