-4

In a different question I posted (I figured out the answer to that question by now), I noticed a mention of 'Landroid' in the logcat.

My original question: Android app starts slow, but works fine after that slow start

W/dalvikvm﹕ Link of class 'Landroid/support/v4/app/ActivityCompat21$SharedElementCallbackImpl;' failed

After searching on SO I noticed other people also have logcats with an L at the start of a URL (URI?) that doesn't seem to make sense.

Unable to resolve superclass of Lnet

W/dalvikvm(7116): Link of class 'Lnet/appcelent/commonlibrary/Lib_MailSender;' failed

android google maps issue

WARN/dalvikvm(498): Link of class 'LShowMap/com/ShowmapActivity;' failed

So I wonder, does that letter L stand for something, or is that a typo somewhere in how the logcat is created? Or is it indicative of a mistake I made myself somewhere?

Also I don't understand what the logcat line means, so that didn't help with my original question either.

Community
  • 1
  • 1
Julius
  • 159
  • 1
  • 1
  • 13

2 Answers2

9

Internally Java represents type names as strings: (I don't know why these rules were chosen)

  • I is int, J is long, other primitive types have other single-letter names.
  • Object types are L<classname>; where <classname> is the full class name with . replaced by /
  • Sticking [ at the front gets you an array of that thing (can have multiple [s for an array of arrays)

Lnet/appcelent/commonlibrary/Lib_MailSender; means the class net.appcelent.commonlibrary.Lib_MailSender. The only bug here is that the message shows the internal name instead of the "user-friendly" class name.

user253751
  • 57,427
  • 7
  • 48
  • 90
2

it came from java byte code, L is prefix for class name.

See http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.3 for more details about all possible prefixes.

farincz
  • 4,943
  • 1
  • 28
  • 38
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – JNYRanger Jul 24 '15 at 14:27
  • Yes it's short answer, but I wrote that L means class name, which is answer to what 'L' mean. – farincz Jul 24 '15 at 14:33
  • I can see both of your points. Though if possibly just fluff out your answer with a little more explanation if possible and then everyone is happy. – Newd Jul 24 '15 at 16:00
  • @Jesus : You are correct, My mistake, but answer could include some more explanations, especially when including a link that explains details. I deleted my comment. – SachinJose Jul 24 '15 at 20:59