I made a App Which Gets Images from Airtable and Display it one by one and when it reached about 21 images this error pops up i dont know why
THE ERROR :
Attempt to invoke virtual method ‘void android.graphics.drawable.BitmapDrawable.setTargetDensity(android.util.DisplayMetrics)’ on a null object reference
Thats the error I hope Someone Knows a Solution. Thanks
This is not your first question here and you have probably seen the link below. You have to give more info for instance your blocks so someone can help you. A null object doesn’t exist so something is probably wrong with your blocks.
To improve the chance of getting help on the forum please follow these recommendations when posting a question:
Do your homework first
Search for similar questions/answers on the forum. Try forum search and also Google your problem.
Try to solve the problem yourself, and describe what you have tried. It is much more rewarding to help someone who has tried himself first.
Post in the right categorie, post only once and do not steal topics
Make sure that you post your question …
You need to set an image somewhere.
I am getting images from Airtable and setting it to a Image View but after 20 images it gets glitchy and shows this error. Can it be the problem of the image i am getting after the 20th image?
Can you show us how you do this so that we can think on optimizing this?
Sure, I’ll post the blocks here
How many images are in the Database?