Build works on local machine but fails on Bitrise due to: compileReleaseJavaWithJavac FAILED

Running Android build fails only in Bitrise but works locally

There is an error when Bitrise run this command
gradlew assembleRelease -p .

Build log

Task :react-native-gesture-handler:compileReleaseJavaWithJavac FAILED
/bitrise/src/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEvent.java:3: error: package android.support.v4.util does not exist
import android.support.v4.util.Pools;
^
/bitrise/src/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEvent.java:19: error: package Pools does not exist
private static final Pools.SynchronizedPool EVENTS_POOL =
^
/bitrise/src/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;
^
/bitrise/src/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 =
^
/bitrise/src/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);
^
/bitrise/src/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: /bitrise/src/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’s the problem?

Hi @smartuser!

Sorry to hear about the issue. Unfortunately, we won’t be able to pin down the problem based on this snippet alone, can you please send us the build URL? That allows us to check out the whole logs and some more useful infos about the build.

I would also like to use this opportunity to point out that your build working locally, is not really an indication that it will work in a very different CI environment, it’s actually more of a pre-requisite :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.