Attempt To Invoke Virtual Method On A Null Object Reference For Video_id
I Am getting this error java.lang.RuntimeException: Unable to instantiate activity ComponentInfo
Solution 1:
getIntent()
would return null unless onCreate
method is called. You are using getIntent
from a field initializer.
Change
Productproduct= (Product) getIntent().getSerializableExtra("product");
to
Product product;
and add this to onCreate
method
product = (Product) getIntent().getSerializableExtra("product");
Post a Comment for "Attempt To Invoke Virtual Method On A Null Object Reference For Video_id"