Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable

Tags:

react-native

Can I know the what is this error and a solution for this? This error occurred at react native apps randomly, in both debug mode and APKs. reproducing this error is difficult.

I saw this issue in github github-https://github.com/facebook/react-native/issues/17530.

but the solution is not a proper one. Is there a proper solution for this error.

like image 788
Thisara Sudaraka Avatar asked Jan 31 '19 07:01

Thisara Sudaraka


3 Answers

It occurs randomly. Just uninstall the app from mobile and restart the server by resetting the cache.

like image 177
Harshal Avatar answered Oct 01 '22 02:10

Harshal


Just close the app and open it again the problem will be solved. But if anyone knows a better way please let me know.

like image 38
MD. IBRAHIM KHALIL TANIM Avatar answered Oct 01 '22 03:10

MD. IBRAHIM KHALIL TANIM


Try to run below command. This worked for me.

npm start --reset-cache
like image 8
Hp Sharma Avatar answered Oct 01 '22 02:10

Hp Sharma