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

Attempt to invoke virtual method ' int java.util.ArrayList.size()' on a null object reference #23

Open
hamza11223322 opened this issue Mar 9, 2021 · 7 comments

Comments

@hamza11223322
Copy link

hamza11223322 commented Mar 9, 2021

When I try to set value into Preference( Preference.set('is_login', 'true') ) This error shown on the device screen.

Screenshot_2021-03-09-19-24-54-62_e91406be5bfb79b703a1d5a4bb16c88e

@ManishKumarPandia
Copy link

ManishKumarPandia commented Mar 10, 2021

Getting same issue :-

"react-native": 0.63.4,
"react-native-preference": "^2.2.1",

Please let me know how can i fix this issue

@bogdan2510
Copy link

bogdan2510 commented Mar 21, 2021

getting same issue on android only.

"react-native": "^0.63.4"
"react-native-preference": "^2.2.1"

Solution that work for me: Preference.setWhiteList([]); before you do any set. this is for android, on ios all is good for me. do it one time. :)

@reimibeta
Copy link

have answer yet?

@DtheRock
Copy link

Any fix available for this issue?

@DtheRock
Copy link

getting same issue on android only.

"react-native": "^0.63.4" "react-native-preference": "^2.2.1"

Solution that work for me: Preference.setWhiteList([]); before you do any set. this is for android, on ios all is good for me. do it one time. :)

Can you please provide us with an example?

@coletz
Copy link

coletz commented Jun 1, 2022

getting same issue on android only.

"react-native": "^0.63.4" "react-native-preference": "^2.2.1"

Solution that work for me: Preference.setWhiteList([]); before you do any set. this is for android, on ios all is good for me. do it one time. :)

Solved the issue for me!
Of course this is just a patch over this bug, but at least calling the setWhiteList method fixed this issue.

@msalik42
Copy link

getting same issue on android only.

"react-native": "^0.63.4" "react-native-preference": "^2.2.1"

Solution that work for me: Preference.setWhiteList([]); before you do any set. this is for android, on ios all is good for me. do it one time. :)

Thanks, This 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

7 participants