null is not an object ( evaluating 'RNGestureHandlerModule.default.Direction')

I'm having this issue in Android with react-nagivation and react-native-gesture-handler latest release. kindly help
please tell solution for android windows.
On Mon, 8 Jul 2019, 3:54 p.m. Yasir KAVRAŞ, [email protected] wrote:
Hello, 1 - yarn add react-navigation 2 - yarn add react-native-gesture-handler 3 - cd ios/ 4 - pod install 5 - cd .. 6 - react-native run-ios and react-native run-android
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kmagiera/react-native-gesture-handler/issues/676?email_source=notifications&email_token=ALAPVJA3WX5YRBG4HU7IEQDP6MME5A5CNFSM4H6XUVL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZMXEYA#issuecomment-509178464, or mute the thread https://github.com/notifications/unsubscribe-auth/ALAPVJHCAPBRJGN37JN7MKDP6MME5ANCNFSM4H6XUVLQ .
I have the same questions.
In 0.60, this is an awful bug. Please solve it as soon as possible.
pod install on ios folder works for me
cd ios
pod install
This worked. Thanks, @har2008preet! 🚀
pod install on ios folder works for me
cd ios pod install
How resolve it on Android and Window system.
it works well in iOS, but still fail to run in Android. Who can tell me how to solve the bug in Android?
I run my app on Android successfully with react-native-gesture-handler
- I disable autoliking
- Using jetify to fix Android X in this time.
@dangtienngoc , can you help how to use jetify to fix android X?
@dangtienngoc , can you help how to use jetify to fix android X?
You can check it here: https://github.com/mikehardy/jetifier
@MrHazimAli I do a video my step resolve issue here:
- For Android: https://youtu.be/NcQhDlC7hT8
- For IOS: -- cd ios -- pod install
thanks @dangtienngoc , working!
thanks @dangtienngoc , it works!!!!
many thanks for your video. @dangtienngoc , I use jetifier It was been build successful.
A anoter error in emulator :
TypeError: null is not an object (evaluating '_RNGestureHandlerModule.default.createGestureHandler')
This error is located at in PanGestureHandler (at StackViewLayout.tsx:372)
Any solutions?
In [email protected] it doesn't work. I still get the same error, even after jetify "null is not an object ( evaluating 'RNGestureHandlerModule.default.Direction')"
@meraklis56 try to commenting this line:
// export { default as Directions } from './Directions';
in the your project -> node_modules -> react-native-gesture-handler -> GestureHandler.js
Good luck.
Now the error is:
07-10 16:20:38.993 16011 16348 E ReactNativeJS: null is not an object (evaluating '_RNGestureHandlerModule.default.handleSetJSResponder') 07-10 16:20:39.067 16011 16348 E ReactNativeJS: null is not an object (evaluating '_RNGestureHandlerModule.default.handleClearJSResponder')
In [email protected] it doesn't work. I still get the same error, even after jetify "null is not an object ( evaluating 'RNGestureHandlerModule.default.Direction')"
[email protected] not support android X yet, check your react native cli
^2.0.0 => ^0.60.0 ^1.0.0 => ^0.59.0
Because react native cli ^2.0.0 support auto linking module
In [email protected] it doesn't work. I still get the same error, even after jetify "null is not an object ( evaluating 'RNGestureHandlerModule.default.Direction')"
Remove this modification: // export { default as Directions } from './Directions';
And if you specified something in your "react-native.config.js", remove it.
add these lines in your MainActivity.java:
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
And add this inside the MainActivity class, just after protected String getMainComponentName() function
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new ReactActivityDelegate(this, getMainComponentName()) {
@Override
protected ReactRootView createRootView() {
return new RNGestureHandlerEnabledRootView(MainActivity.this);
}
};
}
And after that do:
cd android
gradlew clean
cd ..
Then do the usual: react-native run-android, and give me the output.
Good luck.
please check your MainApplication.java with react-native 0.60 looks like:
@Override
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
return packages;
}
if you do not use Autolink function this package will not added try to add
...
List<ReactPackage> packages = new PackageList(this).getPackages();
packages.add(new RNGestureHandlerPackage() );
return packages
and don't forget the import
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
Please give feedback if it works