• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Attempt to get length of null array

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I am making small inventory app where user will enter info about some product then,using a camera he will be able to take an image an store it.i am using SQLlite for storing data.My app is worked just fine until i wanted to use camera for storinig images Then in my CursorAdapter i'am having Attempt to get length of null array.




cursor adapter

 
Saloon Keeper
Posts: 10308
217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would guess that view.findViewById(R.id.slika) returns null. Are you sure that your view contains a descendant ImageView with the given ID?
 
Saloon Keeper
Posts: 5573
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With that error message I would think it more likely that "bitmap" is null - is it? Also, does "slikaDela" have an appropriate size?
 
Milos Gojic
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:With that error message I would think it more likely that "bitmap" is null - is it? Also, does "slikaDela" have an appropriate size?



Yes i changed my post, error occurs in line above
 
Tim Moores
Saloon Keeper
Posts: 5573
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't edit earlier posts, now some of the replies no longer make sense.

Tim Moores wrote:Also, does "slikaDela" have an appropriate size?


 
Milos Gojic
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:Please don't edit earlier posts, now some of the replies no longer make sense.

Tim Moores wrote:Also, does "slikaDela" have an appropriate size?




Sorry for that. I don't know what you mean by appropriate size?
 
Tim Moores
Saloon Keeper
Posts: 5573
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it reflect that it's supposed to contain an image (I guess)? It should be of some size.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!