Hello Treking, Kostya, Romain-Guy,
Ok, I removed the breakpoint, ran it, hit F8 until I got logcat
output. I selected all the red/orange text and exported to a textfile.
This is the result. (I hope I am giving you the answer you request)
01-05 14:57:39.163: W/dalvikvm(9183): threadid=1: thread exiting with
uncaught exception (group=0x40028890)
01-05 14:57:39.308: E/AndroidRuntime(9183): FATAL EXCEPTION: main
01-05 14:57:39.308: E/AndroidRuntime(9183):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{net.skink.swtor.companion/net.skink.swtor.companion.SwtorCompanionActivity}:
java.lang.ClassCastException: java.lang.String
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.app.ActivityThread.access$2300(ActivityThread.java:125)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.os.Handler.dispatchMessage(Handler.java:99)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.os.Looper.loop(Looper.java:123)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.app.ActivityThread.main(ActivityThread.java:4627)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
java.lang.reflect.Method.invokeNative(Native Method)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
java.lang.reflect.Method.invoke(Method.java:521)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
dalvik.system.NativeStart.main(Native Method)
01-05 14:57:39.308: E/AndroidRuntime(9183): Caused by:
java.lang.ClassCastException: java.lang.String
01-05 14:57:39.308: E/AndroidRuntime(9183): at
net.skink.swtor.companion.SwtorCompanionActivity.setCompanions(SwtorCompanionActivity.java:118)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
net.skink.swtor.companion.SwtorCompanionActivity.onCreate(SwtorCompanionActivity.java:62)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-05 14:57:39.308: E/AndroidRuntime(9183): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
01-05 14:57:39.308: E/AndroidRuntime(9183): ... 11 more
This looks like the getItemAtPosition is returning a string instead of
a view. Is this a list of views or a list of strings?
John
On Thu, Jan 5, 2012 at 2:40 PM, Kostya Vasilyev <[email protected]> wrote:
> That's the debugger's stack trace, not the logcat stack trace.
>
> Press F8 a few times until your device displays "the application ....
> stopped unexpectedly".
>
> Then check the logcat panel in Eclipse and post the entire stack trace,
> especially the stuff after "Caused by:"
>
> -- Kostya
>
> 5 января 2012 г. 23:34 пользователь John Davis <[email protected]> написал:
>
>> This is from the debug window in the call stack output.
>>
>> Thread [<1> main] (Suspended (exception RuntimeException))
>> ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord,
>> Intent) line: 2663
>> ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord,
>> Intent) line: 2679
>> ActivityThread.access$2300(ActivityThread,
>> ActivityThread$ActivityRecord, Intent) line: 125
>> ActivityThread$H.handleMessage(Message) line: 2033
>> ActivityThread$H(Handler).dispatchMessage(Message) line: 99
>> Looper.loop() line: 123
>> ActivityThread.main(String[]) line: 4627
>> Method.invokeNative(Object, Object[], Class, Class[], Class, int,
>> boolean) line: not available [native method]
>> Method.invoke(Object, Object...) line: 521
>> ZygoteInit$MethodAndArgsCaller.run() line: 868
>> ZygoteInit.main(String[]) line: 626
>> NativeStart.main(String[]) line: not available [native method]
>>
>>
>> 2012/1/5 John Davis <[email protected]>:
>> > Hello Romain Guy,
>> >
>> > How would I post the full stack trace? The logcat output?
>> >
>> > John
>> >
>> > On Thu, Jan 5, 2012 at 2:30 PM, Romain Guy <[email protected]>
>> > wrote:
>> >> Please post the full stack trace of your exception.
>> >>
>> >> On Thu, Jan 5, 2012 at 11:28 AM, John Davis <[email protected]> wrote:
>> >>> Hello Treking,
>> >>>
>> >>> On Thu, Jan 5, 2012 at 2:17 PM, TreKing <[email protected]> wrote:
>> >>>> On Thu, Jan 5, 2012 at 1:07 PM, John Davis <[email protected]> wrote:
>> >>>>>
>> >>>>> Yes, I would think it is possible, but not in this version. Its
>> >>>>> possible
>> >>>>> to set all line items to the same value. However, its not possible
>> >>>>> to set
>> >>>>> the colors on a case by case value using the provided api.
>> >>>>
>> >>>>
>> >>>> Yes it is. Please stop blaming the platform for your lack of
>> >>>> understanding
>> >>>> it. I already explained how you can create a data-model that holds
>> >>>> the
>> >>>> unique color per item that you then set on the View.
>> >>>>
>> >>>
>> >>> I'm not blaming anyone or the api. I am simply saying it has a bug.
>> >>> Someone might want to look into it.
>> >>>
>> >>>
>> >>>>> But the api does not allow you to set a tag outside this code so
>> >>>>> that the
>> >>>>> routine can change the text color based on the tag.
>> >>>>
>> >>>>
>> >>>> Yes it does. But using the Tag property to achieve this is overkill
>> >>>> and ugly
>> >>>> anyway.
>> >>>
>> >>> Sorry, but it is the only thing provided by the api and its not the
>> >>> settag which raises the exception. It is the getitematpostion call.
>> >>> It says it gets the data at position x. When this call is made it
>> >>> raises and exception. That is the bug. It should return null if it
>> >>> does not exist. Raising an exception sounds like a bug.
>> >>>
>> >>>>
>> >>>>>
>> >>>>> If you try to get this data, it raises an exception.
>> >>>>
>> >>>>
>> >>>> No, if you don't know how to use this function and use it
>> >>>> incorrectly, then
>> >>>> it raises an exception.
>> >>>
>> >>>
>> >>>
>> >>> I am not using the data from the call and getting an exception. I am
>> >>> making the call and getting an exception.
>> >>>
>> >>>
>> >>>>
>> >>>> At this point I have to suggest to you that you take a step back, get
>> >>>> yourself a good book, and review the documentation thoroughly and go
>> >>>> through
>> >>>> the samples. You are apparently confused about a number of things
>> >>>> with how
>> >>>> the adapters work and are not going to get anywhere until you
>> >>>> understand
>> >>>> what they are and how they work.
>> >>>>
>> >>>> Good luck.
>> >>>>
>> >>>>
>> >>>>
>> >>>> -------------------------------------------------------------------------------------------------
>> >>>> TreKing - Chicago transit tracking app for Android-powered devices
>> >>>>
>> >>>> --
>> >>>> You received this message because you are subscribed to the Google
>> >>>> Groups "Android Developers" group.
>> >>>> To post to this group, send email to
>> >>>> [email protected]
>> >>>> To unsubscribe from this group, send email to
>> >>>> [email protected]
>> >>>> For more options, visit this group at
>> >>>> http://groups.google.com/group/android-developers?hl=en
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> John F. Davis
>> >>>
>> >>> 独树一帜
>> >>>
>> >>> --
>> >>> You received this message because you are subscribed to the Google
>> >>> Groups "Android Developers" group.
>> >>> To post to this group, send email to
>> >>> [email protected]
>> >>> To unsubscribe from this group, send email to
>> >>> [email protected]
>> >>> For more options, visit this group at
>> >>> http://groups.google.com/group/android-developers?hl=en
>> >>
>> >>
>> >>
>> >> --
>> >> Romain Guy
>> >> Android framework engineer
>> >> [email protected]
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups "Android Developers" group.
>> >> To post to this group, send email to
>> >> [email protected]
>> >> To unsubscribe from this group, send email to
>> >> [email protected]
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/android-developers?hl=en
>> >
>> >
>> >
>> > --
>> > John F. Davis
>> >
>> > 独树一帜
>>
>>
>>
>> --
>> John F. Davis
>>
>> 独树一帜
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
John F. Davis
独树一帜
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en