Correction: they are line numbers, just not in YOUR code: e.g., 461 is
a line number in AdapterView.java, which doesn't help much. As for
your original logcat listing, what you need to do here is notice that
this is a Runtime exception thrown because you don't have a method for
addView(View, LayoutParams) in the view you added, AdapterView.

And indeed, if you look at the up to date javadoc for AdapterView, you
will find that it throws an exception for most combination of addView,
in particular, for the one you tried to do. AdapterViews are not
supposed to get their views this way.

So the REAL question is: why are you trying to call addView on an
AdapterView?

On Feb 13, 12:32 pm, Mohamed Gougam <mblack...@gmail.com> wrote:
> there is no more then 174 line in my code and this is in the .java file,
> while the XML files are twenties and 58... so those numbers are not line
> numbers...
>
> On Mon, Feb 13, 2012 at 10:56 PM, Kostya Vasilyev <kmans...@gmail.com>wrote:
>
>
>
>
>
>
>
> > This has nothing to do with API level.
>
> > As for line numbers, here they are:
>
> > 02-13 13:02:11.538: E/AndroidRuntime(196): Caused by:
>
> > java.lang.UnsupportedOperationException: addView(View, LayoutParams)
> > is not supported in AdapterView
> > 02-13 13:02:11.538: E/AndroidRuntime(196):      at
> > android.widget.AdapterView.addView(AdapterView.java:*461*)
> > 02-13 13:02:11.538: E/AndroidRuntime(196):      at
> > android.view.LayoutInflater.rInflate(LayoutInflater.java:*622*)
> > 02-13 13:02:11.538: E/AndroidRuntime(196):      at
> > android.view.LayoutInflater.rInflate(LayoutInflater.java:*621*)
> > 02-13 13:02:11.538: E/AndroidRuntime(196):      at
> > android.view.LayoutInflater.inflate(LayoutInflater.java:*407*)
> > 02-13 13:02:11.538: E/AndroidRuntime(196):      at
> > android.view.LayoutInflater.inflate(LayoutInflater.java:*320*)
> > 02-13 13:02:11.538: E/AndroidRuntime(196):      at
> > android.view.LayoutInflater.inflate(LayoutInflater.java:*276*)
> > 02-13 13:02:11.538: E/AndroidRuntime(196):      at
>
> > com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:
> > *198*)
> > 02-13 13:02:11.538: E/AndroidRuntime(196):      at
> > android.app.Activity.setContentView(Activity.java:*1622*)
> > 02-13 13:02:11.538: E/AndroidRuntime(196):      at
> > android.mgo.helloandroid.BTDdetecetwithV7Activity.onCreate(*
> > BTDdetecetwithV7Activity.java:
> > 44*)
>
> > 13 февраля 2012 г. 22:33 пользователь Mohamed Gougam <mblack...@gmail.com>
> > написал:
>
> > > isn't it related to being using Version 7 ? would it make sense if i try
> > the
> > > code on a API Version8?
>
> > > PS: no there is nothing such as line number, everything was displayed on
> > the
> > > LogCat screen is posted.
>
> > --
> > 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

-- 
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

Reply via email to