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

Java.lang.Boolean cannot be cast too Java.lang.Double #5

Closed
noelzappy opened this issue Jun 25, 2022 · 6 comments
Closed

Java.lang.Boolean cannot be cast too Java.lang.Double #5

noelzappy opened this issue Jun 25, 2022 · 6 comments

Comments

@noelzappy
Copy link

The picker works fine on iOS however, on Android it throws the error Java.lang.Boolean cannot be cast too Java.lang.Double.

Screenshot_1656164045

@StefanMeijer
Copy link

StefanMeijer commented Jun 25, 2022

#1

Downgrade gesture handler version.

@noelzappy
Copy link
Author

#1

Downgrade gesture handler version.

To what version specifically?

@StefanMeijer
Copy link

#1

Downgrade gesture handler version.

To what version specifically?

I got mine working on: ~2.2.1

@AlixH
Copy link

AlixH commented Aug 24, 2022

Is downgrading the only solution ?

@tahaipek
Copy link

I think a downgrade is not the only solution. I solved it as below and it worked.

You can check the versions of the dependencies as follows.

npm why react-native-gesture-handler

As a result of running this command, I have reached the following rows.

react-native-gesture-handler@2.6.0
node_modules/react-native-gesture-handler
---react-native-gesture-handler@"^2.4.2" from the root project
---peer react-native-gesture-handler@">= 1.0.0" from @react-navigation/stack@6.2.3
---node_modules/@react-navigation/stack
------@react-navigation/stack@"^6.2.1" from the root project

react-native-gesture-handler@2.2.1
node_modules/react-native-actions-sheet-picker/node_modules/react-native-gesture-handler
---react-native-gesture-handler@"2.2.1" from react-native-actions-sheet-picker@0.3.5
---node_modules/react-native-actions-sheet-picker
------react-native-actions-sheet-picker@"^0.3.5" from the root project

I solved it by adding the following lines to "package.json" file.

"overrides": {
     "react-native-gesture-handler": "^2.6.0"
}

If you are using "yarn" you should add the following lines.

"resolutions": {
  "react-native-gesture-handler": <Gesture Handler version>
}

You can find more information on the website.
"Multiple versions of Gesture Handler were detected" documentation

@edsonjuniornarvaes
Copy link

Eu acho que um rebaixamento não é a única solução. Eu resolvi como abaixo e funcionou.

Você pode verificar as versões das dependências da seguinte maneira.

npm why react-native-gesture-handler

Como resultado da execução deste comando, cheguei às seguintes linhas.

react-native-gesture-handler@2.6.0
node_modules/react-native-gesture-handler
---react-native-gesture-handler@"^2.4.2" from the root project
---peer react-native-gesture-handler@">= 1.0.0" from @react-navigation/stack@6.2.3
---node_modules/@react-navigation/stack
------@react-navigation/stack@"^6.2.1" from the root project

react-native-gesture-handler@2.2.1
node_modules/react-native-actions-sheet-picker/node_modules/react-native-gesture-handler
---react-native-gesture-handler@"2.2.1" from react-native-actions-sheet-picker@0.3.5
---node_modules/react-native-actions-sheet-picker
------react-native-actions-sheet-picker@"^0.3.5" from the root project

Resolvi-o adicionando as seguintes linhas ao arquivo "package.json.

"overrides": {
     "react-native-gesture-handler": "^2.6.0"
}

Se você estiver usando "fios", adicione as seguintes linhas.

"resolutions": {
  "react-native-gesture-handler": <Gesture Handler version>
}

Você pode encontrar mais informações no site. "Documentação "Versões múltiplas do Gesture Handler foram detectadas"

Thank you, it worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants