You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did all steps mentioned in that doc , and confirmed that the configuration is corrent . but when i run the app , it will crash , (the react-native version is 0.30.0 , run in the android emulator,and the package server had been started and was live ) ,here is the logs
08-03 09:32:45.215 1216-2098/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
08-03 09:32:45.697 2699-2699/com.awesomeproject E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.awesomeproject, PID: 2699
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Could not connect to development server.
Try the following to fix the issue:
Ensure that the packager server is running
Ensure that your device/emulator is connected to your machine and has USB debugging enabled - run 'adb devices' to see a list of connected devices
If you're on a physical device connected to the same machine, run 'adb reverse tcp:8081 tcp:8081' to forward requests from your device
If your device is on the same Wi-Fi network, set 'Debug server host & port for device' in 'Dev settings' to y
at com.facebook.react.ReactInstanceManagerImpl.createReactContext(ReactInstanceManagerImpl.java:912)
at com.facebook.react.ReactInstanceManagerImpl.access$700(ReactInstanceManagerImpl.java:99)
at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:196)
at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:179)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
and sometimes the package server will stoped when build android project , e.g.
who can help me ! I had try all the method what I can think of , I just want integrate the react-native to my existing android project . sorry for my poor english !
The text was updated successfully, but these errors were encountered:
连不上开发服务器吧!
仔细看你的报错信息,log中有说明: "If you're on a physical device connected to the same machine, run ' adb reverse tcp:8081 tcp:8081 ' to forward requests from your device"。
cmd下运行一次“adb reverse tcp:8081 tcp:8081”。
after learned the doc https://facebook.github.io/react-native/docs/integration-with-existing-apps.html , I new a MyReactActivity as follows
I did all steps mentioned in that doc , and confirmed that the configuration is corrent . but when i run the app , it will crash , (the react-native version is 0.30.0 , run in the android emulator,and the package server had been started and was live ) ,here is the logs
08-03 09:32:45.215 1216-2098/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
08-03 09:32:45.697 2699-2699/com.awesomeproject E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.awesomeproject, PID: 2699
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Could not connect to development server.
Try the following to fix the issue:
Ensure that the packager server is running
Ensure that your device/emulator is connected to your machine and has USB debugging enabled - run 'adb devices' to see a list of connected devices
If you're on a physical device connected to the same machine, run 'adb reverse tcp:8081 tcp:8081' to forward requests from your device
If your device is on the same Wi-Fi network, set 'Debug server host & port for device' in 'Dev settings' to y
at com.facebook.react.ReactInstanceManagerImpl.createReactContext(ReactInstanceManagerImpl.java:912)
at com.facebook.react.ReactInstanceManagerImpl.access$700(ReactInstanceManagerImpl.java:99)
at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:196)
at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:179)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
and sometimes the package server will stoped when build android project , e.g.
who can help me ! I had try all the method what I can think of , I just want integrate the react-native to my existing android project . sorry for my poor english !
The text was updated successfully, but these errors were encountered: