I put public everywhere in the Java but no success.

Anywhere else? Sure I don't need something in my manifest?

m.

On Feb 4, 9:16 pm, Dave Sparks <davidspa...@android.com> wrote:
> Make sure your constructor is declared "public". This is a common
> mistake when adding custom views to a layout file.
>
> On Feb 4, 5:13 pm, Vternal Android <mdunsm...@gmail.com> wrote:
>
> > Thanks this is very helpful. Further down I found:
>
> > E/AndroidRuntime( 2846): Caused by: java.lang.NoSuchMethodException:
> > VternalTestPreview
> > E/AndroidRuntime( 2846):        at java.lang.Class.getMatchingConstructor
> > (Class.java:537)
> > E/AndroidRuntime( 2846):        at 
> > java.lang.Class.getConstructor(Class.java:
> > 401)
> > E/AndroidRuntime( 2846):        at android.view.LayoutInflater.createView
> > (LayoutInflater.java:474)
>
> > But I have a constructor!
>
> > what now, I looked at SurfaceView and I conform to its Constructor
> > template. Any ideas?
>
> > btw - I have your book.Read it cover to cover getting started. I wish
> > you well with it.
>
> > m.
>
> > On Feb 4, 11:12 am, Mark Murphy <mmur...@commonsware.com> wrote:
>
> > > Vternal Android wrote:
> > > > I tried it out but I get an inflation exception in the containing
> > > > activity:
>
> > > >         InflateException: Binary XML file line #8: Error inflating
> > > > class com.vternal.papp.VternalTestPreview
>
> > > I usually find InflateExceptions like this are caused by a nested
> > > exception in the constructor of the View in question. Is there another
> > > exception stack trace, flagged as "Caused by", below this one in your
> > > error log?
>
> > > --
> > > Mark Murphy (a Commons Guy)http://commonsware.com
> > > _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to