For the time being, I have gotten around this problem by having a second initializer which calls the methods that are throwing the problems.
I believe this is a bug, to be honest. At the very least, if there are separate classes for the actual Android SDK and the Android SDK that Eclipse uses, I would think that the layout editor should catch these exceptions. Why the Paint class would have setStyle() available and not setStrokeJoin() available in the 'separate' SDK is beyond me. Does anyone know how to report a bug? On Mar 30, 11:40 pm, Matt <matthew.quig...@gmail.com> wrote: > In thelayouteditor inEclipse, I have created a custom view. For > some reason, there are a few methods which cause NoSuchMethodError > exceptions in the code. Here is the code in the initializer of the > custom view: > > mPaint = new Paint(); > mPaint.setAntiAlias(true); > mPaint.setDither(true); > mPaint.setColor(0xFFFF0000); > mPaint.setStyle(Paint.Style.STROKE); > > try { > //mPaint.setStrokeJoin(Paint.Join.ROUND); > //mPaint.setStrokeCap(Paint.Cap.ROUND); > } catch (Exception e) { > > } > mPaint.setStrokeWidth(12); > > The code which is causing no such method exceptions are the ones > surrounded in a try-catch. By the way, the try-catch does NOT stop > thelayouteditor from getting the exception (and therefore failing to > render). > > Does anyone have any clue of why a few methods on the Paint class are > throwing errors? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---