When I try to reference an image from the code of an activity I get the problem:
java.lang.RuntimeException: Unable to start activity ComponentInfo {com.example.deybin.figuremapsearching / com.example.deybin.figuremapsearching.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setImageResource (int) 'on a null object reference
This is the main problem:
Attempt to invoke virtual method 'void android.widget.ImageView.setImageResource (int) 'on a null object reference
I would really appreciate any response
I have my Image View, and I also have it linked to my xml.
I suspect that my problem is: Compatibility or maybe depending on the place in the code where you referred them.
I will not include the code that you request because I consider it has no purpose, thank you very much