Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution failed for task ':react-native-gesture-handler:compileDebugJavaWithJavac' #647

Closed
emclab opened this issue Jun 20, 2019 · 48 comments
Labels
Platform: Android This issue is specific to Android

Comments

@emclab
Copy link

emclab commented Jun 20, 2019

I am fixing a incompatibility issue related to AndroidX by adding 2 lines to gradle.properties under android for my RN 0.59.5 project.

android.useAndroidX=true
android.enableJetifier=true

Now there is another error with run-android related to react-native-gesture-handler. Then I yarn remove the current react-native-gesture-handler of 1.2.0 and add it back. The new version is 1.3.0. Here is the error:

Task :react-native-gesture-handler:compileDebugJavaWithJavac
C:\D\code\js\emps_app\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;
^
C:\D\code\js\emps_app\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 =
^
C:\D\code\js\emps_app\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;
^
C:\D\code\js\emps_app\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 =
^
C:\D\code\js\emps_app\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);
^
C:\D\code\js\emps_app\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: C:\D\code\js\emps_app\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

Task :react-native-gesture-handler:compileDebugJavaWithJavac FAILED

The error is related 6 packages missing and I guess it is still related to Androidx. But I have no clue how to fix it. There is an issue post#510 suggesting downgraded to version 1.0.5 for fixing but I wouldn't like to use such an old version.

@iacocesar
Copy link

same issue on rn 0.60

@nikopolidi
Copy link

same issue after refactoring support library to androidx
[email protected]

@vbspace
Copy link

vbspace commented Jun 25, 2019

any solution ?

@mayermatheus
Copy link

any solution ???

@nikopolidi
Copy link

nikopolidi commented Jun 25, 2019

Solved by rolling back to appcompat-v7:28.0.0 Android support libraries and
'yarn upgrade --pattern react-native'

@mayermatheus
Copy link

@nikopolidi
It did not work here

@mayermatheus
Copy link

I was able to follow this documentation.

1º Click in react-native-gesture-handler project on android studio
2º Click in Refactor on top
3º Click Migrate to AndroidX.

@vbspace
Copy link

vbspace commented Jun 25, 2019

@mayermatheus I think I tried that already and it didn't work. I'll try again. Thank you

@zmGitHub
Copy link

zmGitHub commented Jul 4, 2019

e..... any solution RN 60

@boazeb
Copy link

boazeb commented Jul 4, 2019

@zmGitHub

npm i jetifier
npx jetify

fixed it for me on rn 0.6

@Karniej
Copy link

Karniej commented Jul 4, 2019

@zmGitHub

npm i jetifier
npx jetify

fixed it for me on rn 0.6

This fixed it for me. Thank you !

@isaax2
Copy link

isaax2 commented Jul 4, 2019

@boazeb
Amazing!! It works :)

@pavlo-o-savchuk
Copy link

pavlo-o-savchuk commented Jul 5, 2019

What did work is to downgrade React Native and do following:
npm install [email protected]
and then

npm i react-native-gesture-handler
react-native link react-native-gesture-handler
.... and repeat the same with any other problem component. 

Warning: watch out "npm audit fix" since it will return react-native version to 0.60 - the latest for this moment.

@styk-tv
Copy link

styk-tv commented Jul 6, 2019

@boazeb thank you, works with 0.6 now. and i've learned something new https://stackoverflow.com/questions/51680671/what-is-jetifier

@hmunna36
Copy link

hmunna36 commented Jul 6, 2019

@boazeb Thank u so much.!!

@tolustar
Copy link

tolustar commented Jul 7, 2019

@boazeb Thank you so much !!! It worked like magic

@mfrag38
Copy link

mfrag38 commented Jul 8, 2019

@zmGitHub

npm i jetifier
npx jetify

fixed it for me on rn 0.6

It works, Thanks

@softwaredev21
Copy link

softwaredev21 commented Jul 9, 2019

@zmGitHub It works, thanks.

@costadaniel
Copy link

@zmGitHub

npm i jetifier
npx jetify

fixed it for me on rn 0.6

How do this using yarn?

@isaax2
Copy link

isaax2 commented Jul 10, 2019

@zmGitHub
npm i jetifier
npx jetify
fixed it for me on rn 0.6

How do this using yarn?

1.- Add jetifier as dev dependency
yarn add jetifier --dev

2.- Add a task in package.json inside of "scripts" tag,

"scripts": {
....
"jetify": "npx jetify"
}

3.- Run as yarn
yarn jetify

@deepakgd
Copy link

deepakgd commented Jul 10, 2019

1.- Add jetifier as dev dependency
yarn install jetifier --dev

2.- Add a task in package.json inside of "scripts" tag,

"scripts": {
....
"jetify": "npx jetify"
}

3.- Run as yarn
yarn jetify

@isaax2 thanks this works... Please update step one like this yarn add jetifier --dev

@affanhashone
Copy link

nothing Above Works

@guitorioadar
Copy link

@mununki
Copy link

mununki commented Jul 29, 2019

@boazeb it fixes my issues perfectly! Awesome!

@isaax2
Copy link

isaax2 commented Jul 31, 2019

1.- Add jetifier as dev dependency
yarn install jetifier --dev
2.- Add a task in package.json inside of "scripts" tag,

"scripts": {
....
"jetify": "npx jetify"
}

3.- Run as yarn
yarn jetify

@isaax2 thanks this works... Please update step one like this yarn add jetifier --dev

@deepakgd thanks it's done.

@DuffmanBE
Copy link

DuffmanBE commented Jul 31, 2019

@zmGitHub
npm i jetifier
npx jetify
fixed it for me on rn 0.6

This fixed it for me. Thank you !

This alone did not fix the issue for me. I also had to open the Refactor menu in Android Studio and click "Migrate to AndroidX...". After doing so, building the project succeeded again.

@alishgiri
Copy link

alishgiri commented Aug 6, 2019

try adding this in android/app/build.gradle -> dependencies {} . It solved my problem after upgrading RN to v0.60.4
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"

@mayooresan
Copy link

@zmGitHub

npm i jetifier
npx jetify

fixed it for me on rn 0.6

If you get an error in Android studio after this about launching activity not found then go File -> Invalidate Caches/restart.

@douglassoldan
Copy link

Solved by rolling back to appcompat-v7:28.0.0 Android support libraries and
'yarn upgrade --pattern react-native'

Works here! Thanks bro!

@TheTimeWalker
Copy link

TheTimeWalker commented Aug 16, 2019

I feel like people have started to go off-topic in this thread. The OP here has an issue with gesture handler on pre-0.60 so the solutions here don't apply for that.

For anybody that is still on pre-0.60, this can actually be a different module that accidentally imports AndroidX libraries. In my case it was rn-fetch-blob

@edwardmsmith
Copy link

@TheTimeWalker So, what did you do to fix it? Did you revert to a specific version of rn-fetch-blob?

I'm having this issue too with 0.59, and I also use rn-fetch-blob.

@TheTimeWalker
Copy link

TheTimeWalker commented Aug 17, 2019

I accidentally updated which is only usable if you have RN 0.60. I reverted to v0.10.15 which is the last compatible version for 0.59 and now the error magically disappeared for gesture-handler

So in general, try to find any modules you have installed with a version that has implemented AndroidX support. These override settings and break gesture-handler

@Joltik
Copy link

Joltik commented Aug 21, 2019

@zmGitHub
npm i jetifier
npx jetify
fixed it for me on rn 0.6

How do this using yarn?

1.- Add jetifier as dev dependency
yarn add jetifier --dev

2.- Add a task in package.json inside of "scripts" tag,

"scripts": {
....
"jetify": "npx jetify"
}

3.- Run as yarn
yarn jetify

0.60.4 Works here! Thanks!

@waleedarshad
Copy link

Placed android.useAndroidX=true
android.enableJetifier=true
in gadle.properties
and
npm i jetifier
npx jetify
fixed it for me on rn 0.59.9

@iba-ragi
Copy link

iba-ragi commented Sep 5, 2019

Placed android.useAndroidX=true
android.enableJetifier=true
in gadle.properties
and
npm i jetifier
npx jetify
fixed it for me on rn 0.59.9

0.59.5 Works here! Thanks!!

@BrunoFDeveloper
Copy link

@zmGitHub

npm i jetifier
npx jetify

fixed it for me on rn 0.6

Thank you!

@vtam311
Copy link

vtam311 commented Sep 14, 2019

I'm on react-native 0.59.9, and rolling back to version 1.2.1 worked for me

@AwaisIbrar8
Copy link

can anyone tell me how to resolve this error?

:react-native-gesture-handler:checkDebugManifest 3 ms

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':react-native-gesture-handler:checkDebugManifest'.
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:38)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:73)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:49)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:49)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.gradle.api.UncheckedIOException: Failed to create parent directory '/Users/awaisibrar/Downloads/Jiglis/node_modules/react-native-gesture-handler/android/build' when creating directory '/Users/awaisibrar/Downloads/Jiglis/node_modules/react-native-gesture-handler/android/build/intermediates/check_manifest_result/debug/checkDebugManifest/out'
at org.gradle.util.GFileUtils.mkdirs(GFileUtils.java:327)
at org.gradle.internal.execution.steps.CreateOutputsStep.ensureOutput(CreateOutputsStep.java:58)
at org.gradle.internal.execution.steps.CreateOutputsStep.access$000(CreateOutputsStep.java:32)
at org.gradle.internal.execution.steps.CreateOutputsStep$1.visitOutputProperty(CreateOutputsStep.java:47)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.visitOutputProperties(ExecuteActionsTaskExecuter.java:229)
at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:43)
at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:45)
at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:31)
at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:201)
at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:70)
at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:45)
at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49)
at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:43)
at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:32)
at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38)
at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24)
at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:96)
at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:89)
at java.util.Optional.map(Optional.java:215)
at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:54)
at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:38)
at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:77)
at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26)
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:90)
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:48)
at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:120)
at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionStateTaskExecuter.execute(ResolveBeforeExecutionStateTaskExecuter.java:75)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:108)
at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute(ResolveBeforeExecutionOutputsTaskExecuter.java:67)
at org.gradle.api.internal.tasks.execution.ResolveAfterPreviousExecutionStateTaskExecuter.execute(ResolveAfterPreviousExecutionStateTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:94)
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:95)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
... 27 more

@okumujustine
Copy link

on "react-native": "0.59.10"

this works for me
1.adding this in gradle.properties
android.enableJetifier=true
android.useAndroidX=true

  1. npm i jetifier
    2.adding "postinstall": "jetifier -r" to scripts
    3.npx jetify

@TxusBlack
Copy link

TxusBlack commented Nov 25, 2019

Placed android.useAndroidX=true
android.enableJetifier=true
in gadle.properties
and
npm i jetifier
npx jetify
fixed it for me on rn 0.59.9

Works for me on 0.59.1!

@Jshaider
Copy link

npx react-native run-android
info Starting JS server...
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...

Configure project :react-native-tts
WARNING: Configuration 'compile' is obsolete and
has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

Task :react-native-gesture-handler:compileDebugJavaWithJavac FAILED
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerEnabledRootView.java:11: error: cannot find symbol
import androidx.annotation.Nullable;
^
symbol: class Nullable
location: package androidx.annotation
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\lib\src\main\java\com\swmansion\gesturehandler\GestureHandlerOrchestrator.java:14: error: cannot find symbol
import androidx.annotation.Nullable;
^
symbol: class Nullable
location: package androidx.annotation
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerEvent.java:3: error: package androidx.core.util does not exist
import androidx.core.util.Pools;
^
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerEvent.java:11: error: cannot find symbol
import androidx.annotation.Nullable;
^
symbol: class Nullable
location: package androidx.annotation
E:\technoweaving\words4kids-master\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 =
^
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerModule.java:37: error: cannot find symbol
import androidx.annotation.Nullable;
^
symbol: class Nullable
location: package androidx.annotation
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerRegistry.java:11: error: cannot find symbol
import androidx.annotation.Nullable;
^
symbol: class Nullable
location: package androidx.annotation
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerPackage.java:16: error: cannot find symbol
import androidx.annotation.Nullable;
^
symbol: class Nullable
location: package androidx.annotation
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerRootInterface.java:3: error: cannot find symbol
import androidx.annotation.Nullable;
^
symbol: class Nullable
location: package androidx.annotation
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerRootView.java:15: error: cannot find symbol
import androidx.annotation.Nullable;
^
symbol: class Nullable
location: package androidx.annotation
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerRootViewManager.java:10: error: cannot find symbol
import androidx.annotation.Nullable;
^
symbol: class Nullable
location: package androidx.annotation
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerStateChangeEvent.java:3: error: package androidx.core.util does not exist
import androidx.core.util.Pools;
^
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerStateChangeEvent.java:11: error: cannot find symbol
import androidx.annotation.Nullable;
^
symbol: class Nullable
location: package androidx.annotation
E:\technoweaving\words4kids-master\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 =
^
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerEnabledRootView.java:15: error: cannot find symbol
private @nullable ReactInstanceManager mReactInstanceManager;
^
symbol: class Nullable
location: class RNGestureHandlerEnabledRootViewE:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerEnabledRootView.java:16: error: cannot find symbol
private @nullable RNGestureHandlerRootHelper mGestureRootHelper;
^
symbol: class Nullable
location: class RNGestureHandlerEnabledRootViewE:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerEnabledRootView.java:68: error: cannot find symbol
@nullable Bundle initialProperties) {
^
symbol: class Nullable
location: class RNGestureHandlerEnabledRootViewE:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\lib\src\main\java\com\swmansion\gesturehandler\GestureHandlerOrchestrator.java:321: error: cannot find symbol
private boolean isViewAttachedUnderWrapper(@nullable View view) {
^
symbol: class Nullable
location: class GestureHandlerOrchestrator
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerEvent.java:24: error: cannot find symbol
@nullable RNGestureHandlerEventDataExtractor dataExtractor) {
^
symbol: class Nullable
location: class RNGestureHandlerEvent
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerEvent.java:40: error: cannot find symbol
@nullable RNGestureHandlerEventDataExtractor dataExtractor) {
^
symbol: class Nullable
location: class RNGestureHandlerEvent
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerModule.java:530: error: cannot find symbol
public @nullable Map getConstants() {
^
symbol: class Nullable
location: class RNGestureHandlerModule
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerModule.java:634: error: cannot find symbol
private @nullable RNGestureHandlerRootHelper findRootHelperForViewAncestor(int viewTag) {
^
symbol: class Nullable
location: class RNGestureHandlerModule
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerModule.java:652: error: cannot find symbol
private @nullable HandlerFactory findFactoryForHandler(GestureHandler handler) {
^
symbol: class Nullable
location: class RNGestureHandlerModule
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerRegistry.java:23: error: cannot find symbol
public synchronized @nullable GestureHandler getHandler(int handlerTag) {
^
symbol: class Nullable
location: class RNGestureHandlerRegistry
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerRootInterface.java:6: error: cannot find symbol
@nullable RNGestureHandlerRootHelper getRootHelper();
^
symbol: class Nullable
location: interface RNGestureHandlerRootInterface
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerRootView.java:32: error: cannot find symbol
private @nullable RNGestureHandlerRootHelper mRootHelper;
^
symbol: class Nullable
location: class RNGestureHandlerRootView
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerRootViewManager.java:42: error: cannot find symbol
public @nullable Map getExportedCustomDirectEventTypeConstants() {
^
symbol: class Nullable
location: class RNGestureHandlerRootViewManagerE:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerStateChangeEvent.java:26: error: cannot find symbol
@nullable RNGestureHandlerEventDataExtractor dataExtractor) {
^
symbol: class Nullable
location: class RNGestureHandlerStateChangeEvent
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerStateChangeEvent.java:44: error: cannot find symbol
@nullable RNGestureHandlerEventDataExtractor dataExtractor) {
^
symbol: class Nullable
location: class RNGestureHandlerStateChangeEvent
E:\technoweaving\words4kids-master\node_modules\react-native-gesture-handler\android\lib\src\main\java\com\swmansion\gesturehandler\GestureHandlerOrchestrator.java:328: error: cannot find symbol
@nullable ViewParent parent = view.getParent();
^
symbol: class Nullable
location: class GestureHandlerOrchestrator
E:\technoweaving\words4kids-master\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);
^
E:\technoweaving\words4kids-master\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: E:\technoweaving\words4kids-master\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.
32 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

BUILD FAILED in 3s
17 actionable tasks: 1 executed, 16 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.bat app:installDebug. Run CLI with --verbose flag for more details.

@Balday2
Copy link

Balday2 commented Apr 25, 2020

in gadle.properties
Placed:
android.useAndroidX=true
android.enableJetifier=true

After that install jetifier
npm i jetifier
npx jetify

fixed it for me on react-native 0.60.0

@jakub-gonet jakub-gonet added the Platform: Android This issue is specific to Android label Sep 3, 2020
@jakub-gonet
Copy link
Member

Should be resolved. If that's not a case, please respond.

@cameronmbacon
Copy link

This worked for me:

  1. cd ./android
  2. rm -rf ./gradle
  3. Install Gradle globally onto local machine. https://gradle.org/install/
  4. Add Gradle to your PATH variable.
  5. run gradle wrapper in the /android directory after reloading terminal.
  6. gradle clean and gradle build both worked for me after performing these steps and I was able to view my application in my Android emulator.

@Ali-TM-original
Copy link

@cameronmbacon what was your react-native version. Cause i am trying to install react-native-gesture-handler however i get this react-native-gesture-handler:compileDebugKotlin failed with react-native 0.66.1

@hpelitebook745G2
Copy link

@Ali-TM-original I also got the same issue with you. here's my versions:
"react-native": "0.63.4"
"react-native-gesture-handler": "^2.5.0"
"react-native-reanimated": "^2.8.0"
have you found solution?

@Ali-TM-original
Copy link

@hpelitebook745G2 Well i reverted back to react native 62 it seemed to work, I recently upgraded react-native version to 67 and it worked for some reason. None of the solutions mentioned here worked for me.

@mulenatni
Copy link

mulenatni commented Feb 22, 2023

in react native project any help

Task :react-native-gesture-handler:assertNoMultipleInstances FAILE

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android This issue is specific to Android
Projects
None yet
Development

No branches or pull requests