Closed wkh237 closed 8 years ago
Are you using the latest release (3.0-pre1)?
How are you using this with React Native?
Any Dalvik logs that can give any hints?
Hi @ericwlange , I'm using 3.0-pre1, I just write a module which following the instructions of official document.
@ReactMethod
public void createJSContext(
JSContext ctx = new JSContext(); // <-- application stucks here
}
I tried to find useful informations from log, but it doesn't log anything. I've create a sample react-native project that can reproduce this problem. If it is convenient your may clone the repository and try to run the project.
The implementation is in this file.
Thanks. I will take a look. I've never used it alongside React Native, so I fear there may be a native library conflict. Have you tried to use it without React Native? Can you confirm that it doesn't hang when the react SDK is not present?
On Monday, June 13, 2016, wkh237 notifications@github.com wrote:
Hi @ericwlange https://github.com/ericwlange , I'm using 3.0-pre1, I just write a module which following the instructions of official document https://facebook.github.io/react-native/docs/native-modules-android.html.
@ReactMethod public void createJSContext( JSContext ctx = new JSContext(); // <-- application stucks here }
I tried to find useful informations from log, but it doesn't log anything. I've create a sample react-native project https://github.com/wkh237/rn-android-jsc-issue that can reproduce this problem. If it is convenient your may clone the repository and try to run the project.
The implementation is in this file https://github.com/wkh237/rn-android-jsc-issue/blob/master/android/app/src/main/java/com/sample/AndroidJSCModule.java#L30-L34 .
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ericwlange/AndroidJSCore/issues/27#issuecomment-225477915, or mute the thread https://github.com/notifications/unsubscribe/ABIuZMyqfCzaZRBuuVSnMlp8t0ePAm6Jks5qLMEQgaJpZM4IzkDD .
This is confirmed as working in 3.0.1. BTW, you left .show()
off the end of your Toast.makeText()
lines. I am not sure if you were expecting them to display or not. In any case, I have verified that it plays nice with React Native.
I'm using this library to make a React Native module, when I try to create a JSContext instance, the whole application just hanged.
I looks like the process stopped after executes the constructor
I've tried to put the line into a thread, but it still happens. Is there any suggestion on this ?
Many thanks.