android debug Source not found

tip 2013. 4. 27. 12:48

[출처] http://android.opensourceror.org/2010/01/18/android-source/

 

Attaching Android platform source in Eclipse

Are you tired of seeing this when you look at your platform JAR in Eclipse?

Dude, where's my source?

Or how about this when you’re debugging?

How am I supposed to debug this?

Android is open source, right? So how do we see the source?

Some background

  • Tip: If you’re just here to get it working and don’t care where it came from, you can skip on a bit.

This article summarizes and augments three other posts that spelled out how to get the source and use it. It is surprisingly difficult to get your hands on the correct version of the source you need for this purpose, so in addition to describing that process I’m providing the end result for your convenience.

My sources

My three source posts are:

Both the posts and the comments were very helpful, but somewhat out of date now. How to put it all together?

Getting the right code

The source is all available, but it’s spread out among several projects which put together constitute the Android Open Source Project. Thus I needed to install the repo tool (as described on the “Get source” page) in order to pull down all of the relevant git repositories. The articles describe getting the latest code – the trick is getting the code specific to the platform version you’re working on; at the time everyone was working with 1.0!

When you sync the Android repos, you’ll see output describing the available branches and tags something like this:

 * [new branch]      cupcake    -> korg/cupcake
 * [new branch]      cupcake-release -> korg/cupcake-release
 * [new branch]      donut      -> korg/donut
 * [new branch]      donut-release -> korg/donut-release
 * [new branch]      eclair     -> korg/eclair
 * [new branch]      master     -> korg/master
 * [new branch]      release-1.0 -> korg/release-1.0
 * [new tag]         android-1.0 -> android-1.0
 * [new tag]         android-1.5 -> android-1.5
 * [new tag]         android-1.5r2 -> android-1.5r2
 * [new tag]         android-1.5r3 -> android-1.5r3
 * [new tag]         android-1.5r4 -> android-1.5r4
 * [new tag]         android-1.6_r1 -> android-1.6_r1
 * [new tag]         android-1.6_r1.1 -> android-1.6_r1.1
 * [new tag]         android-1.6_r1.2 -> android-1.6_r1.2

This list generally contains some other random stuff and varies by project. The tags seem to be logically named and standardized across projects, but I couldn’t find how to get the repo tool to pull source based on a tag (if someone knows, by all means comment below). Repo takes the -b option to specify a branch however, and the cupcake / donut / eclair branches are universal, so those are what I used to make the source archives linked in this article, e.g.:

repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake
repo sync

Of course, branches are generally moving targets, so caveat emptor.

Assembling the code as Eclipse expects it

If you follow the above and have a good connection and some patience, you’ll eventually have a directory full of some 2GiB of “stuff,” some of which is the source code you’re looking for. But Eclipse needs just the source, in just the right place. Forster’s post “View Android Source Code in Eclipse” provides a python script for rounding up the source code and creating a nice zip archive out of it, and Burke’s post “Browsing Android Source in Eclipse” describes how to figure out where to put it – in a “sources” directory created underneath the SDK platform directory. Other comments on those posts are helpful for coercing Eclipse to recognize that the source is available.

What you came here for

Without further ado, here’s how you attach source to your platform classes. N.B. all screenshots are from Eclipse 3.5 “Galileo” – other versions may differ significantly.

Download source

Download the zipped source code that I’ve gathered for each platform you are developing for.

Put the source in place

For each platform, create a folder “sources” under that platform (e.g. sdk/platforms/android-1.5/sources) and unzip the source code into it. Then refresh your project (select project and press F5 or right-click and select “Refresh”).

Right click on the project and refresh

Voila, you should see the source!

YES, I SEE the SOURCE!

Getting the debugger on board

I found that even after I’d placed sources in the platform, if I was debugging and ended up deep in the platform (In this case, with an exception), the debugger might not show the code:

Sometimes the debugger still won't show the source

However, it’s fairly straightforward to fix this. Just click on that “Edit Source Lookup Path” button to add a source lookup path. In that dialog leave “Default” selected and click “Add.”

In the following “Add Source” dialog choose “File System Directory” and hit the OK button:

Then choose the source directory where you unzipped the code. The debugger should now show all the code you can debug into.

Source in the debugger... which may or may not help you figure out what went wrong; in this case, a layout error caught at runtime.

A word of caution, though: Eclipse’s debugger seems to think that once you’ve set a source lookup for one project, it’s relevant for all of them. If you’re using different platforms for different projects, you’ll want to change the source it uses. You can do that by right-clicking on the project in the debugger and choosing “Edit Source Lookup” to repeat this process.

Getting back to source lookup in the debugger

Patches welcome

Hopefully this guide makes attaching source easy for you. If the code provided here seems out of sync with the platform when you’re debugging, let me know. If someone knows a better way to pick out the exact code for the different platform versions, comment below. If I’ve slightly (or utterly) misrepresented something, correct me. If you’re just happy to finally see your source, I’d be glad to hear about it!

Both comments and pings are currently closed.  

'tip' 카테고리의 다른 글

svn store password unencrypted  (0) 2013.04.27
How to detect UTF-8  (0) 2013.04.27
android debug Source not found  (0) 2013.04.27
TileTemplateType  (0) 2013.04.27
Segoe UI Symbols  (0) 2013.04.27
[팁] 맥 부트캠프에서 Windows 8 Release Preview & visual studio 12 멈춤 문제 해결  (0) 2013.04.27
Trackbacks 0 : Comments 0

Write a comment


TileTemplateType

tip 2013. 4. 27. 12:48

 

[출처] http://msdn.microsoft.com/ko-kr/library/windows/apps/hh761491.aspx#TileWidePeekImage04

 

The TileTemplateType enumeration has these members.

 

Member Value Description
TileSquareImage | tileSquareImage 0

One square image that fills the entire tile, no text.

TileSquareBlock | tileSquareBlock 1

One string of large block text over a single, short line of bold, regular text.

TileSquareText01 | tileSquareText01 2

One header string in larger text on the first line; three strings of regular text on each of the next three lines. Text does not wrap.

TileSquareText02 | tileSquareText02 3

One header string in larger text on the first line, over one string of regular text wrapped over a maximum of three lines.

TileSquareText03 | tileSquareText03 4

Four strings of regular text on four lines. Text does not wrap.

TileSquareText04 | tileSquareText04 5

One string of regular text wrapped over a maximum of four lines.

TileSquarePeekImageAndText01 | tileSquarePeekImageAndText01 6

Top: One square image, no text. Bottom: One header string in larger text on the first line, three strings of regular text on each of the next three lines. Text does not wrap.

TileSquarePeekImageAndText02 | tileSquarePeekImageAndText02 7

Top: Square image, no text. Bottom: One header string in larger text on the first line, over one string of regular text wrapped over a maximum of three lines.

TileSquarePeekImageAndText03 | tileSquarePeekImageAndText03 8

Top: Square image, no text. Bottom: Four strings of regular text on four lines. Text does not wrap.

TileSquarePeekImageAndText04 | tileSquarePeekImageAndText04 9

Top: Square image, no text. Bottom: One string of regular text wrapped over a maximum of four lines.

TileWideImage | tileWideImage 10

One wide image that fills the entire tile, no text.

TileWideImageCollection | tileWideImageCollection 11

One large square image with four smaller square images to its right, no text.

TileWideImageAndText01 | tileWideImageAndText01 12

One wide image over one string of regular text wrapped over a maximum of two lines.

TileWideImageAndText02 | tileWideImageAndText02 13

One wide image over two strings of regular text on two lines. Text does not wrap.

TileWideBlockAndText01 | tileWideBlockAndText01 14

Four strings of regular, unwrapped text on the left; large block text over a single, short string of bold, regular text on the right.

TileWideBlockAndText02 | tileWideBlockAndText02 15

One string of regular text wrapped over a maximum of four lines on the left; large block text over a single, short string of bold, regular text on the right.

TileWidePeekImageCollection01 | tileWidePeekImageCollection01 16

Top: One large square image with four smaller square images to its right, no text. Bottom: One header string in larger text over one string of regular text wrapped over a maximum of four lines.

TileWidePeekImageCollection02 | tileWidePeekImageCollection02 17

Top: One large square image with four smaller square images to its right, no text. Bottom: One header string in larger text on the first line, four strings of regular text on the next four lines. Text does not wrap.

TileWidePeekImageCollection03 | tileWidePeekImageCollection03 18

Top: One large square image with four smaller square images to its right, no text. Bottom: One string of large text wrapped over a maximum of three lines.

TileWidePeekImageCollection04 | tileWidePeekImageCollection04 19

Top: One large square image with four smaller square images to its right, no text. Bottom: One string of regular text wrapped over a maximum of five lines.

TileWidePeekImageCollection05 | tileWidePeekImageCollection05 20

Top: One large square image with four smaller square images to its right, no text. Bottom: On the left, one small image; on the right, one header string of larger text on the first line over one string of regular text wrapped over a maximum of four lines.

TileWidePeekImageCollection06 | tileWidePeekImageCollection06 21

Top: One large square image with four smaller square images to its right, no text. Bottom: On the left, one small image; on the right, one string of large text wrapped over a maximum of three lines.

TileWidePeekImageAndText01 | tileWidePeekImageAndText01 22

Top: One wide image. Bottom: One string of regular text wrapped over a maximum of five lines.

TileWidePeekImageAndText02 | tileWidePeekImageAndText02 23

Top: One wide image. Bottom: Five strings of regular text on five lines. Text does not wrap.

TileWidePeekImage01 | tileWidePeekImage01 24

Top: One wide image. Bottom: One header string in larger text over one string of regular text that wraps over a maximum of four lines.

TileWidePeekImage02 | tileWidePeekImage02 25

Top: One wide image. Bottom: One header string in larger text on the first line, four strings of regular text on the next four lines. Text does not wrap.

TileWidePeekImage03 | tileWidePeekImage03 26

Top: One wide image. Bottom: One string of large text wrapped over a maximum of three lines.

TileWidePeekImage04 | tileWidePeekImage04 27

Top: One wide image. Bottom: One string of regular text wrapped over a maximum of five lines.

TileWidePeekImage05 | tileWidePeekImage05 28

Top: One wide image. Bottom: On the left, one small image; on the right, one header string of larger text on the first line over one string of regular text wrapped over a maximum of four lines.

TileWidePeekImage06 | tileWidePeekImage06 29

Top: One wide image. Bottom: On the left, one small image; on the right, one string of large text wrapped over a maximum of three lines.

TileWideSmallImageAndText01 | tileWideSmallImageAndText01 30

On the left, one small image; on the right, one string of large text wrapped over a maximum of three lines.

TileWideSmallImageAndText02 | tileWideSmallImageAndText02 31

On the left, one small image; on the right, one header string in larger text on the first line, four strings of regular text on the next four lines. Text does not wrap.

TileWideSmallImageAndText03 | tileWideSmallImageAndText03 32

On the left, one small image; on the right, one string of regular text wrapped over a maximum of five lines.

TileWideSmallImageAndText04 | tileWideSmallImageAndText04 33

On the left, one small image; on the right, one header string of larger text on the first line over one string of regular text wrapped over a maximum of four lines.

TileWideSmallImageAndText05 | tileWideSmallImageAndText05 34

On the left, one header string in larger text over one string of regular text wrapped over a maximum of four lines; on the right, one small image with 3:4 dimensions.

TileWideText01 | tileWideText01 35

One header string in larger text on the first line, four strings of regular text on the next four lines. Text does not wrap.

TileWideText02 | tileWideText02 36

One header string in larger text over eight short strings arranged in two columns of four lines each. Columns are of equal width.

TileWideText03 | tileWideText03 37

One string of large text wrapped over a maximum of three lines.

TileWideText04 | tileWideText04 38

One string of regular text wrapped over a maximum of five lines.

TileWideText05 | tileWideText05 39

Five strings of regular text on five lines. Text does not wrap.

TileWideText06 | tileWideText06 40

Ten short strings of regular text, arranged in two columns of five lines each. Columns are of equal width.

TileWideText07 | tileWideText07 41

One header string in larger text over eight short strings of regular text arranged in two columns of four lines each. The column widths are such that the first column acts as a label and the second column as the content. This template is similar to TileWideText10, but the first column is wider.

TileWideText08 | tileWideText08 42

Ten short strings of regular text arranged in two columns of five lines each. The column widths are such that the first column acts as a label and the second column as the content. This template is similar to TileWideText11, but the first column is wider.

TileWideText09 | tileWideText09 43

One header string in larger text over one string of regular text wrapped over a maximum of four lines.

TileWideText10 | tileWideText10 44

One header string in larger text over eight short strings of regular text arranged in two columns of four lines each. The column widths are such that the first column acts as a label and the second column as the content. This template is similar to TileWideText07, but the first column is narrower.

TileWideText11 | tileWideText11 45

Ten short strings of regular text arranged in two columns of five lines each. The column widths are such that the first column acts as a label and the second column as the content. This template is similar to TileWideText08, but the first column is narrower.

 

 

'tip' 카테고리의 다른 글

How to detect UTF-8  (0) 2013.04.27
android debug Source not found  (0) 2013.04.27
TileTemplateType  (0) 2013.04.27
Segoe UI Symbols  (0) 2013.04.27
[팁] 맥 부트캠프에서 Windows 8 Release Preview & visual studio 12 멈춤 문제 해결  (0) 2013.04.27
ftp 숨김 파일 강제 표시 하기  (0) 2013.04.27
Trackbacks 0 : Comments 0

Write a comment


Segoe UI Symbols

tip 2013. 4. 27. 12:47

[출처] http://www.nogginbox.co.uk/blog/app-bar-buttons-in-winrt

Segoe UI Symbols

These will only display correctly if you have Segoe UI Symbol installed (this font comes with Windows 8)

#xe100;

#xe101;

#xe102;

#xe103;

#xe104;

#xe105;

#xe106;

#xe107;

#xe108;

#xe109;

#xe10a;

#xe10b;

#xe10c;

#xe10d;

#xe10e;

#xe10f;

#xe110;

#xe111;

#xe112;

#xe113;

#xe114;

#xe115;

#xe116;

#xe117;

#xe118;

#xe119;

#xe11a;

#xe11b;

#xe11c;

#xe11d;

#xe11e;

#xe11f;

#xe120;

#xe121;

#xe122;

#xe123;

#xe124;

#xe125;

#xe126;

#xe127;

#xe128;

#xe129;

#xe12a;

#xe12b;

#xe12c;

#xe12d;

#xe12e;

#xe12f;

#xe130;

#xe131;

#xe132;

#xe133;

#xe134;

#xe135;

#xe136;

#xe137;

#xe138;

#xe139;

#xe13a;

#xe13b;

#xe13c;

#xe13d;

#xe13e;

#xe13f;

#xe140;

#xe141;

#xe142;

#xe143;

#xe144;

#xe145;

#xe146;

#xe147;

#xe148;

#xe149;

#xe14a;

#xe14b;

#xe14c;

#xe14d;

#xe14e;

#xe14f;

#xe150;

#xe151;

#xe152;

#xe153;

#xe154;

#xe155;

#xe156;

#xe158;

#xe159;

#xe15a;

#xe15b;

#xe15c;

#xe15d;

#xe15e;

#xe15f;

#xe160;

#xe161;

#xe162;

#xe163;

#xe164;

#xe165;

#xe166;

#xe167;

#xe168;

#xe169;

#xe16a;

#xe16b;

#xe16c;

#xe16d;

#xe16e;

#xe16f;

#xe170;

#xe171;

#xe172;

#xe173;

#xe174;

#xe175;

#xe176;

#xe177;

#xe178;

#xe179;

#xe17a;

#xe17b;

#xe17c;

#xe17d;

#xe17e;

#xe17f;

#xe181;

#xe182;

#xe183;

#xe184;

#xe185;

#xe186;

#xe187;

#xe188;

#xe189;

#xe18a;

#xe18b;

#xe18c;

#xe18d;

#xe18e;

#xe18f;

#xe190;

#xe191;

#xe192;

#xe193;

#xe194;

#xe195;

#xe196;

#xe197;

#xe198;

#xe199;

#xe19a;

#xe19b;

#xe19c;

#xe19d;

#xe19e;

#xe19f;

#xe1a0;

#xe1a1;

#xe1a2;

#xe1a3;

#xe1a4;

#xe1a5;

#xe1a6;

#xe1a7;

#xe1a8;

#xe1a9;

#xe1aa;

#xe1ab;

#xe1ac;

#xe1ad;

#xe1ae;

#xe1af;

#xe1b0;

#xe1b1;

#xe1b2;

#xe1b3;

#xe1b4;

#xe1b5;

#xe1b6;

#xe1b7;

#xe1b8;

#xe1b9;

#xe1ba;

#xe1bb;

#xe1bc;

#xe1bd;

#xe1be;

#xe1bf;

#xe1c0;

#xe1c1;

#xe1c2;

#xe1c3;

#xe1c4;

#xe1c5;

#xe1c6;

#xe1c7;

#xe1c8;

#xe1c9;

#xe1ca;

#xe1cb;

#xe1cc;

#xe1cd;

#xe1ce;

#xe1cf;

#xe1d0;

#xe1d1;

#xe1d2;

#xe1d3;

#xe1d4;

#xe1d5;

#xe1d6;

#xe1d7;

#xe1d8;

#xe1d9;

#xe1da;

#xe1db;

#xe1dc;

#xe1dd;

#xe1de;

#xe1df;

#xe1e0;

#xe1e1;

#xe1e2;

#xe1e3;

#xe1e4;

#xe1e5;

#xe1e6;

#xe1e7;

#xe1e8;

#xe1e9;

#xe1ea;

#xe1eb;

#xe1ec;

#xe1ed;

#xe1ee;

#xe1ef;

#xe1f0;

#xe1f1;

#xe1f2;

#xe1f3;

#xe1f4;

#xe200;

#xe201;

#xe202;

#xe203;

#xe204;

#xe205;

#xe206;

#xe207;

#xe208;

#xe209;

#xe20a;

#xe20b;

#xe20c;

#xe20d;

#xe20e;

#xe20f;

#xe210;

#xe211;

#xe212;

#xe213;

#xe214;

#xe215;

#xe216;

#xe217;

#xe218;

#xe219;

#xe21a;

#xe21b;

#xe21c;

#xe21d;

#xe21e;

#xe21f;

#xe220;

#xe221;

#xe222;

#xe223;

#xe224;

#xe225;

#xe226;

#xe227;

#xe228;

#xe230;

#xe231;

#xe232;

#xe233;

#xe234;

#xe235;

#xe236;

#xe239;

#xe23a;

#xe241;

#xe242;

#xe243;

#xe244;

#xe245;

#xe246;

#xe247;

#xe248;

#xe249;

#xe24a;

#xe24b;

#xe24c;

#xe24d;

#xe24e;

#xe24f;

#xe250;

#xe251;

#xe252;

#xe253;

#xe254;

#xe255;

#xe256;

#xe257;

#xe258;

#xe259;

#xe25a;

#xe25b;

#xe25c;

#xe25d;

#xe25e;

#xe269;

#xe26a;

#xe26b;

#xe26c;

#xe26e;

#xe26f;

#xe270;

#xe271;

#xff01;

#xff5e;

Trackbacks 0 : Comments 0

Write a comment