Strange Android error I came across tonight(or should I say this morning :s).
[2009-10-13 03:18:29 – TestAccelerometer]
trouble writing output: shouldn’t happen
[2009-10-13 03:18:29 – TestAccelerometer]Conversion to Dalvik format failed with error 2
The error occur when I save my Activity (I have auto-build on, so it could be either the saving or building process).
Like a lazy programmer would do, the first thing I do was trying to find the error on Google. Couple of exact error found but no relation can be found since the root cause is entirely different.
After a few comments & builds tries I found that the problem comes from the following line
size = (size > 10? size = 10: size);
Such a little thing one may miss at 3:20 AM. I’m not sure why Dalvik doesn’t like it but I’m glad I found the solution.
If you are receiving this strange error, first thing I suggest you to do is looking for a strange bit inside your code and pray to your heart content.
Off to bed for today, gotta get up to work at 7 AM 😉