Answer the question
In order to leave comments, you need to log in
Why does the application not start after installing the module on react native?
Hello. I installed the react native device info module to find out the id of the android device. But on startup it gives an error. Registered links through react-native link react-native-device-info. After unlink also does not start.
C:\apps\react\showdriver\android\app\src\main\java\com\showdriver\MainActivity.java:3: error: package com.facebook.react does not exist
import com.facebook.react.ReactActivity;
^
C:\apps\react\showdriver\android\app\src\main\java\com\showdriver\MainActivity.java:5: error: cannot find symbol
public class MainActivity extends ReactActivity {
^
symbol: class ReactActivity
C:\apps\react\showdriver\android\app\src\main\java\com\showdriver\MainApplication.java:6: error: package com.facebook.react does not exist
import com.facebook.react.ReactApplication;
^
C:\apps\react\showdriver\android\app\src\main\java\com\showdriver\MainApplication.java:7: error: package com.facebook.react does not exist
import com.facebook.react.ReactInstanceManager;
^
C:\apps\react\showdriver\android\app\src\main\java\com\showdriver\MainApplication.java:8: error: package com.facebook.react does not exist
import com.facebook.react.ReactNativeHost;
^
C:\apps\react\showdriver\android\app\src\main\java\com\showdriver\MainApplication.java:9: error: package com.facebook.react does not exist
import com.facebook.react.ReactPackage;
^
C:\apps\react\showdriver\android\app\src\main\java\com\showdriver\MainApplication.java:10: error: package com.facebook.react.shell does not exist
import com.facebook.react.shell.MainReactPackage;
^
C:\apps\react\showdriver\android\app\src\main\java\com\showdriver\MainApplication.java:15: error: cannot find symbol
public class MainApplication extends Application implements ReactApplication {
^
symbol: class ReactApplication
C:\apps\react\showdriver\android\app\src\main\java\com\showdriver\MainApplication.java:17: error: cannot find symbol
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
^
symbol: class ReactNativeHost
location: class MainApplication
C:\apps\react\showdriver\android\app\src\main\java\com\showdriver\MainApplication.java:30: error: cannot find symbol
public ReactNativeHost getReactNativeHost() {
^
symbol: class ReactNativeHost
location: class MainApplication
C:\apps\react\showdriver\android\app\src\main\java\com\showdriver\MainActivity.java:11: error: method does not override or implement a method from a supertype
@Override
^
C:\apps\react\showdriver\android\app\src\main\java\com\showdriver\MainApplication.java:17: error: cannot find symbol
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
^
symbol: class ReactNativeHost
location: class MainApplication
12 errors
:app:compileDebugJavaWithJavac FAILED
Answer the question
In order to leave comments, you need to log in
The most probable error is failures at an automatic link. RNPM works well, but not always, so it's best to go through the manual installation instructions for this kind of error (when connecting new modules) - https://github.com/rebeccahughes/react-native-devi...
If that doesn't work , roll back to a running version and install this module completely manually, it should help.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question