0

I need to use react-native-scrollable-tab-view and accompanying that, I also installed/setup react-native-viewpager following this link. This error suddenly appeared and currently, I still can't find a way to solve it. I hope someone encountered it already and help me. I just started working with React Native 1 wk ago but this project I've been working on have been existing for more than a year so not all dependencies are updated including react-native which version is 0.59.10. I've already tried using react-native-scrollable-tab-view with a sample project using latest version of react-native and it works fine but unfortunately I don't think I can upgrade this project cause there are just so many dependencies that will be affected that complicates things. I hope there is a way to resolve it without having to affect other dependencies. Here is the error part of the log:

Task :react-native-gesture-handler:compileDebugJavaWithJavac FAILED /Users/markrogercabadsan/ReactNativeProjects/endless-aisle-hybrid/node_modules/react-native-gesture-handler/android/src/main/java/com/sw mansion/gesturehandler/react/RNGestureHandlerEvent.java:3: error: package android.support.v4.util does not exist import android.support.v4.util.Pools; ^ /Users/markrogercabadsan/ReactNativeProjects/endless-aisle-hybrid/node_modules/react-native-gesture-handler/android/src/main/java/com/sw mansion/gesturehandler/react/RNGestureHandlerEvent.java:19: error: package Pools does not exist private static final Pools.SynchronizedPool EVENTS_POOL = ^ /Users/markrogercabadsan/ReactNativeProjects/endless-aisle-hybrid/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerStateChangeEvent.java:3: error: package android.support.v4.util does not exist import android.support.v4.util.Pools; ^ /Users/markrogercabadsan/ReactNativeProjects/endless-aisle-hybrid/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerStateChangeEvent.java:19: error: package Pools does not exist private static final Pools.SynchronizedPool EVENTS_POOL = ^ /Users/markrogercabadsan/ReactNativeProjects/endless-aisle-hybrid/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEvent.java:20: error: package Pools does not exist new Pools.SynchronizedPool<>(TOUCH_EVENTS_POOL_SIZE); ^ /Users/markrogercabadsan/ReactNativeProjects/endless-aisle-hybrid/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerStateChangeEvent.java:20: error: package Pools does not exist new Pools.SynchronizedPool<>(TOUCH_EVENTS_POOL_SIZE); ^ Note: /Users/markrogercabadsan/ReactNativeProjects/endless-aisle-hybrid/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 6 errors

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':react-native-gesture-handler:compileDebugJavaWithJavac'.

    Compilation failed; see the compiler error output for details.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/4.10.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 24s 251 actionable tasks: 27 executed, 224 up-to-date error Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/getting-started.html error Command failed: ./gradlew app:installDebug. Run CLI with --verbose flag for more details. Marks-MacBook-Pro:endless-aisle-hybrid markrogercabadsan$

2
  • do you have linked your module using react-native link and builded through Android studio? Commented Feb 3, 2020 at 10:43
  • add your package.json file as well Commented Feb 3, 2020 at 10:47

3 Answers 3

0

Try running this command in the android folde, and it hsoould solve it:

./gradlew assembleRelease -x bundleReleaseJsAndAssets 

Hope it helps.

Sign up to request clarification or add additional context in comments.

Comments

0

This problem is already solved. Also, Thanks Mayank Pandav for pointing that out. As you thought, I forgot to run react-native link @react-native-community/viewpager since auto-linking is not done on react native versions < 0.60. After linking, I still had some problem, the usual error with Nullable thingy in react native android but I was able to solve it by migrating to AndroidX thru following this link and adding the following lines in my gradle.properties file:

android.useAndroidX=true;

android.enableJetifier=true;

And after re-running, the error is gone. Thanks everyone.

Comments

0

Downgrade the react-native-gesture-handler version to 1.10.3

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.