<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Android from scratch &#187; n00b frustrations</title>
	<atom:link href="http://android.opensourceror.org/category/n00b-frustrations/feed/" rel="self" type="application/rss+xml" />
	<link>http://android.opensourceror.org</link>
	<description>n00bs leading the n00bs</description>
	<lastBuildDate>Thu, 28 Jan 2010 01:50:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Attaching Android platform source in Eclipse</title>
		<link>http://android.opensourceror.org/2010/01/18/android-source/</link>
		<comments>http://android.opensourceror.org/2010/01/18/android-source/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 17:19:26 +0000</pubDate>
		<dc:creator>luke</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[SDK level 2.1]]></category>
		<category><![CDATA[n00b frustrations]]></category>
		<category><![CDATA[add source]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[aosp]]></category>
		<category><![CDATA[attach source]]></category>
		<category><![CDATA[class file editor]]></category>
		<category><![CDATA[cupcake]]></category>
		<category><![CDATA[debugger]]></category>
		<category><![CDATA[donut]]></category>
		<category><![CDATA[eclair]]></category>
		<category><![CDATA[eclipse configuration]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[platform]]></category>
		<category><![CDATA[platform JAR]]></category>
		<category><![CDATA[repo]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[source lookup]]></category>
		<category><![CDATA[sources]]></category>

		<guid isPermaLink="false">http://android.opensourceror.org/?p=60</guid>
		<description><![CDATA[
Are you tired of seeing this when you look at your platform JAR in Eclipse?


Or how about this when you&#8217;re debugging?
Android is open source, right? So how do we see the source?
Some background

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

This article [...]]]></description>
			<content:encoded><![CDATA[<div class="mceTemp mceIEcenter" style="text-align: left;"></div>
<div class="mceTemp mceIEcenter" style="text-align: left;">Are you tired of seeing this when you look at your platform JAR in Eclipse?</div>
<div class="mceTemp mceIEcenter" style="text-align: left;"></div>
<div class="wp-caption aligncenter" style="width: 810px"><img style="max-width: 800px;" title="Platform class with no source in the editor" src="http://www.mediafire.com/imgbnc.php/f55363afb5cae0909f019e1a3cc1e43b6g.jpg" alt="" width="800" height="549" /><p class="wp-caption-text">Dude, where&#39;s my source? </p></div>
<p><span id="more-60"></span></p>
<p>Or how about this when you&#8217;re debugging?</p>
<div class="wp-caption aligncenter" style="width: 710px"><img style="max-width: 800px;" title="Debugging platform class with no source" src="http://www.mediafire.com/imgbnc.php/22f99041712cbe59d8d47a94b1af9d8c5g.jpg" alt="" width="700" height="457" /><p class="wp-caption-text">How am I supposed to debug this?</p></div>
<p>Android is open source, right? So how do we see the source?</p>
<h1>Some background</h1>
<ul>
<li><span style="color: #993300;"><em><strong>Tip: If you&#8217;re just here to get it working and don&#8217;t care where it came from, you can skip on a bit.</strong></em></span></li>
</ul>
<p>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&#8217;m providing the end result for your convenience.</p>
<h2>My sources</h2>
<p>My three source posts are:</p>
<ul>
<li><a href="http://blog.michael-forster.de/2008/12/view-android-source-code-in-eclipse.html">View Android Source Code in Eclipse</a> by <a href="http://blog.michael-forster.de/" target="_blank">Dr. Michael Forster</a> of Google</li>
<li><a title="Permanent Link: Browsing Android Source in Eclipse" rel="bookmark" href="http://stuffthathappens.com/blog/2008/11/01/browsing-android-source-in-eclipse/">Browsing Android Source in Eclipse</a> by <a href="http://stuffthathappens.com/blog/" target="_blank">Eric Burke</a></li>
<li><span id="sites-page-title" dir="ltr"><a href="http://source.android.com/download/" target="_blank">Get source</a> from the <a href="http://source.android.com/" target="_blank">Android Open Source Project</a></span><span id="sites-page-title" dir="ltr"> </span></li>
</ul>
<p>Both the posts and the comments were very helpful, but somewhat out of date now. How to put it all together?</p>
<h2>Getting the right code</h2>
<p>The source is all available, but it&#8217;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 &#8220;<span id="sites-page-title" dir="ltr"><a href="http://source.android.com/download/" target="_blank">Get source</a></span>&#8221; page) in order to pull down all of the relevant git repositories. The articles describe getting the latest code &#8211; the trick is getting the code specific to the platform version you&#8217;re working on; at the time everyone was working with 1.0!</p>
<p>When you sync the Android repos, you&#8217;ll see output describing the available branches and tags something like this:</p>
<pre><span style="font-family: Courier New;"> * [new branch]      cupcake    -&gt; korg/cupcake
 * [new branch]      cupcake-release -&gt; korg/cupcake-release
 * [new branch]      donut      -&gt; korg/donut
 * [new branch]      donut-release -&gt; korg/donut-release
 * [new branch]      eclair     -&gt; korg/eclair
 * [new branch]      master     -&gt; korg/master
 * [new branch]      release-1.0 -&gt; korg/release-1.0
 * [new tag]         android-1.0 -&gt; android-1.0
 * [new tag]         android-1.5 -&gt; android-1.5
 * [new tag]         android-1.5r2 -&gt; android-1.5r2
 * [new tag]         android-1.5r3 -&gt; android-1.5r3
 * [new tag]         android-1.5r4 -&gt; android-1.5r4
 * [new tag]         android-1.6_r1 -&gt; android-1.6_r1
 * [new tag]         android-1.6_r1.1 -&gt; android-1.6_r1.1
 * [new tag]         android-1.6_r1.2 -&gt; android-1.6_r1.2</span></pre>
<p>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&#8217;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.:</p>
<pre>repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake
repo sync</pre>
<p>Of course, branches are generally moving targets, so caveat emptor.</p>
<h2>Assembling the code as Eclipse expects it</h2>
<p>If you follow the above and have a good connection and some patience, you&#8217;ll eventually have a directory full of some 2GiB of &#8220;stuff,&#8221; some of which is the source code you&#8217;re looking for. But Eclipse needs just the source, in just the right place. Forster&#8217;s post &#8220;<a href="http://blog.michael-forster.de/2008/12/view-android-source-code-in-eclipse.html">View Android Source Code in Eclipse</a>&#8221; provides a python script for rounding up the source code and creating a nice zip archive out of it, and Burke&#8217;s post &#8220;<a title="Permanent Link: Browsing Android Source in Eclipse" rel="bookmark" href="http://stuffthathappens.com/blog/2008/11/01/browsing-android-source-in-eclipse/">Browsing Android Source in Eclipse</a>&#8221; describes how to figure out where to put it &#8211; in a &#8220;sources&#8221; directory created underneath the SDK platform directory. Other comments on those posts are helpful for coercing Eclipse to recognize that the source is available.</p>
<h1>What you came here for</h1>
<p>Without further ado, here&#8217;s how you attach source to your platform classes. N.B. all screenshots are from Eclipse 3.5 &#8220;Galileo&#8221; &#8211; other versions may differ significantly.</p>
<h2>Download source</h2>
<p>Download the zipped source code that I&#8217;ve gathered for each platform you are developing for.</p>
<ul>
<li><a href="http://www.mediafire.com/file/mywjymazt3m/sources-1.5-cupcake.zip" target="_blank">Cupcake (1.5)</a></li>
<li><a href="http://www.mediafire.com/file/r0uzq1f0e0m/sources-1.6-donut.zip" target="_blank">Donut (1.6)</a></li>
<li><a href="http://www.mediafire.com/file/mninnmzznxc/sources-2.1-eclair.zip" target="_blank">Eclair (2.1)</a></li>
</ul>
<h2>Put the source in place</h2>
<p>For each platform, create a folder &#8220;sources&#8221; 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 &#8220;Refresh&#8221;).</p>
<div class="wp-caption aligncenter" style="width: 338px"><img style="max-width: 800px;" title="Right click menu for a project" src="http://www.mediafire.com/imgbnc.php/b3f31b95ec48a4440101ee6efd3c81025g.jpg" alt="" width="328" height="432" /><p class="wp-caption-text">Right click on the project and refresh</p></div>
<p>Voila, you should see the source!</p>
<div class="wp-caption aligncenter" style="width: 765px"><img style="max-width: 800px;" title="Editor now showing platform source" src="http://www.mediafire.com/imgbnc.php/13faa32467218450994fe9c32d1b6a4a6g.jpg" alt="" width="755" height="459" /><p class="wp-caption-text">YES, I SEE the SOURCE!</p></div>
<p style="text-align: center;">
<h2></h2>
<h2>Getting the debugger on board</h2>
<p>I found that even after I&#8217;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:</p>
<div class="wp-caption aligncenter" style="width: 810px"><img style="max-width: 800px;" title="Debugger, still not seeing the source" src="http://www.mediafire.com/imgbnc.php/1022934b3972a7d015e216a6d1cb4e566g.jpg" alt="" width="800" height="309" /><p class="wp-caption-text">Sometimes the debugger still won&#39;t show the source</p></div>
<p>However, it&#8217;s fairly straightforward to fix this. Just click on that &#8220;Edit Source Lookup Path&#8221; button to add a source lookup path. In that dialog leave &#8220;Default&#8221; selected and click &#8220;Add.&#8221;</p>
<p style="text-align: center;"><img class="aligncenter" title="&quot;Edit Source Lookup Path&quot; dialog" src="http://www.mediafire.com/imgbnc.php/57b1e1bf69249f124d3f3b133b4f55bc5g.jpg" alt="" width="613" height="448" /></p>
<p>In the following &#8220;Add Source&#8221; dialog choose &#8220;File System Directory&#8221; and hit the OK button:</p>
<p style="text-align: center;"><img class="aligncenter" title="&quot;Add Center&quot; dialog" src="http://www.mediafire.com/imgbnc.php/8306ac5e78409595881bce3f57e300265g.jpg" alt="" width="613" height="346" /></p>
<p>Then choose the source directory where you unzipped the code. The debugger should now show all the code you can debug into.</p>
<div class="wp-caption aligncenter" style="width: 810px"><img class=" " title="Debug dialog now showing the source" src="http://www.mediafire.com/imgbnc.php/f705ffc1214d009cad09eb6e376e2ddf6g.jpg" alt="" width="800" height="548" /><p class="wp-caption-text">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.</p></div>
<p>A word of caution, though: Eclipse&#8217;s debugger seems to think that once you&#8217;ve set a source lookup for one project, it&#8217;s relevant for all of them. If you&#8217;re using different platforms for different projects, you&#8217;ll want to change the source it uses. You can do that by right-clicking on the project in the debugger and choosing &#8220;Edit Source Lookup&#8221; to repeat this process.</p>
<div class="wp-caption aligncenter" style="width: 411px"><img title="Getting back to source lookup in the debugger" src="http://www.mediafire.com/imgbnc.php/c85b1944faabd790c474affdbc5fb6676g.jpg" alt="" width="401" height="386" /><p class="wp-caption-text">Getting back to source lookup in the debugger</p></div>
<h1>Patches welcome</h1>
<p style="text-align: left;">Hopefully this guide makes attaching source easy for you. If the code provided here seems out of sync with the platform when you&#8217;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&#8217;ve slightly (or utterly) misrepresented something, correct me. If you&#8217;re just happy to finally see your source, I&#8217;d be glad to hear about it!</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 1150px; width: 1px; height: 1px;">http://source.android.com/download/</div>
]]></content:encoded>
			<wfw:commentRss>http://android.opensourceror.org/2010/01/18/android-source/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Editing XML resources for Android in Eclipse</title>
		<link>http://android.opensourceror.org/2009/12/30/editing-xml-resources-for-android-in-eclipse/</link>
		<comments>http://android.opensourceror.org/2009/12/30/editing-xml-resources-for-android-in-eclipse/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 15:22:04 +0000</pubDate>
		<dc:creator>luke</dc:creator>
				<category><![CDATA[ADT plugin]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[SDK level 2.0.1]]></category>
		<category><![CDATA[n00b frustrations]]></category>
		<category><![CDATA[ADT]]></category>
		<category><![CDATA[annoyances]]></category>
		<category><![CDATA[auto-complete]]></category>
		<category><![CDATA[auto-format]]></category>
		<category><![CDATA[editing]]></category>
		<category><![CDATA[fixed]]></category>
		<category><![CDATA[preferences]]></category>
		<category><![CDATA[suggest]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://android.opensourceror.org/2009/12/30/editing-xml-resources-for-android-in-eclipse/</guid>
		<description><![CDATA[Just the other day, I was griping about the way Eclipse ADT tools dump out XML in long unreadable lines like this:
As with so many things, Eclipse is your friend if you just know how to set it up. As it turns out, Artem Russakovskii of Beer Planet recently wrote an excellent post with instructions [...]]]></description>
			<content:encoded><![CDATA[<p>Just the other day, I was griping about the way Eclipse ADT tools dump out XML in long unreadable lines like this:<img style="max-width: 800px;" src="http://android.opensourceror.org/wp-content/uploads/2009/12/resource_before.png" /></p>
<p>As with so many things, Eclipse is your friend if you just know how to set it up. As it turns out, Artem Russakovskii of <a target="_blank" href="http://beerpla.net/">Beer Planet</a> recently wrote an <a target="_blank" href="http://beerpla.net/2009/11/04/android-auto-formatting-android-xml-files-with-eclipse/">excellent post with instructions</a> for configuring Eclipse to auto-format your XML pleasingly so it will look more like this:<br /><img style="max-width: 800px;" src="http://android.opensourceror.org/wp-content/uploads/2009/12/resource_after.png" /></p>
<p>I can do no better than to <a target="_blank" href="http://beerpla.net/2009/11/04/android-auto-formatting-android-xml-files-with-eclipse/">refer you to the post</a>. In case he moves it or something, the short-and-sweet version is:
<ol>
<li>Window -&gt; Preferences -&gt; XML -&gt; XML Files -&gt; Editor</li>
<li>Source -&gt; Cleanup Document</li>
</ol>
<p>Making your XML readable means it&#8217;s also a lot more writeable. The ADT GUIs for working with resources are very handy, and you might not think you want to write XML by hand, but Eclipse is your friend here, too: it will suggest and auto-complete tags and attributes for you.<br /><img style="max-width: 800px;" src="http://android.opensourceror.org/wp-content/uploads/2009/12/eclipse_suggest_clipped.png" /></p>
<p>Eclipse can suggest and auto-complete allowed tags, attributes, and values for attributes based on the XML schemas supplied by the SDK. If Eclipse isn&#8217;t automatically suggesting (or like me, you&#8217;ve turned off auto-suggestions because they&#8217;re annoying), you can just press Ctrl-Space with your cursor placed where you&#8217;d like a suggestion in the document, use the arrow keys to choose a suggestion, and hit Enter to accept one. As you can see above, the suggestions come with at least minimal descriptions to jog your memory. This makes writing XML &#8220;by hand&#8221; almost completely painless.</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=6e317e63-e54b-87e7-83e2-803b19847838" /></div>
]]></content:encoded>
			<wfw:commentRss>http://android.opensourceror.org/2009/12/30/editing-xml-resources-for-android-in-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emulator frustrations for n00bs</title>
		<link>http://android.opensourceror.org/2009/12/23/emulator-frustrations-for-n00bs/</link>
		<comments>http://android.opensourceror.org/2009/12/23/emulator-frustrations-for-n00bs/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 00:31:56 +0000</pubDate>
		<dc:creator>luke</dc:creator>
				<category><![CDATA[SDK level 2.0.1]]></category>
		<category><![CDATA[emulator]]></category>
		<category><![CDATA[n00b frustrations]]></category>
		<category><![CDATA[adb]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[DDMS]]></category>
		<category><![CDATA[device bridge]]></category>
		<category><![CDATA[force close]]></category>
		<category><![CDATA[kill server]]></category>
		<category><![CDATA[n00bs]]></category>
		<category><![CDATA[patience]]></category>
		<category><![CDATA[startup]]></category>

		<guid isPermaLink="false">http://android.opensourceror.org/2009/12/23/emulator-frustrations-for-n00bs/</guid>
		<description><![CDATA[Here are a hodgepodge of issues related to using the emulator.
The emulator takes forever to come up
Yes, yes it does, especially the first time you start it. It&#8217;s emulating booting up a complete OS running on a different architecture (ARM processor) than your development machine &#8211; so yeah, it&#8217;s a little slow. If you have [...]]]></description>
			<content:encoded><![CDATA[<p>Here are a hodgepodge of issues related to using the emulator.</p>
<h2>The emulator takes forever to come up</h2>
<p>Yes, yes it does, especially the first time you start it. It&#8217;s emulating booting up a complete OS running on a different architecture (ARM processor) than your development machine &#8211; so yeah, it&#8217;s a little slow. If you have an Android device you know that even running natively it&#8217;s not exactly an instant startup, so expect some delays in the emulator too.</p>
<p>Just go ahead and start the emulator when you start Eclipse and it&#8217;ll be there when you need it. Keep it running, there&#8217;s no need to stop and start it all the time.</p>
<h2>Why does deploying a package to the emulator keep failing?</h2>
<p>Often this is because you&#8217;re trying to deploy before the emulator has finished booting (because you waited until you were ready to try out your app before starting the emulator). The Home process needs to be running before a deploy will work. It&#8217;s a common n00b mistake to try the &#8220;run&#8221; button on Eclipse, watch it start an emulator and fail to deploy, kill the emulator, and try it again &#8211; it will never succeed until the emulator finishes booting.</p>
<p>Deploy may also fail for basically the same reason when the device bridge server has failed (see below) and Eclipse DDMS starts a new emulator (or tries to).</p>
<p>Of course, the other reason deploying may fail is if there&#8217;s something wrong with your package. Perhaps the API you&#8217;re developing against isn&#8217;t available on the emulator, or you&#8217;ve messed up something in the application manifest. But those problems should be fairly easy to diagnose from the error messages on the console.</p>
<h2>I keep ending up with emulators that can&#8217;t be attached to</h2>
<p>I&#8217;m not sure why this happens &#8211; something to do with networking (esp. during suspend/hibernate), or non-Sun Java JDK, or updating components while an emulator is running. But sometimes you&#8217;ll be running an emulator and it won&#8217;t show up in the list of emulators (either the command line <span style="font-family: monospace;">adb devices</span> or in the Eclipse DDMS perspective &#8211; or I&#8217;ve seen it show up in the perspective but without any processes).</p>
<p>Of course the simple remedy is to kill the emulator and start a new one, but as noted previously, that takes forever. The emulator is  running &#8211; why can&#8217;t you connect to it?</p>
<p>Try using the &#8220;Reset adb&#8221; option from the DDMS Devices view menu, or restarting the server at the command line:</p>
<p><span style="font-family: monospace;"> </span></p>
<p><span style="font-family: Courier New;">adb kill-server<br />
adb start-server</span></p>
<p><span style="font-family: monospace;"> </span></p>
<p>Otherwise I don&#8217;t know what you can do.<span> I have a <a href="http://moderator.appspot.com/#11/e=120951&amp;t=agltb2RlcmF0b3JyLwsSCERvcnlVc2VyIiF1ZjQ3YTg1OTI1NmQ4ZWI5MDQ4Y2NjM2I4NmJlMjZhNTAM" target="_blank">question in about this</a> and I&#8217;m waiting for an answer, too.</span></p>
<h2><span>My emulator keeps offering to &#8220;force close&#8221; odd things, especially at startup</span></h2>
<p><span>This is pretty common for me at least; you may never have seen it if you have better hardware. Just choose the &#8220;wait&#8221; option, everything will work out. I have a theory about this &#8211; perhaps someone who knows better will enlighten me if I&#8217;m wrong. Android has a policy of offering to force close non-responsive elements, where &#8220;non-responsive&#8221; means it hasn&#8217;t handled an event five seconds after it was notified of the event. As noted above, you&#8217;re running an emulator here, and it tends to run a bit slowly &#8211; but the clock is still ticking in realtime. I believe it&#8217;s simply a matter of certain parts of the operating system taking too long to respond, especially at boot time. Just ignore it and wait for them to finish.<br />
</span></p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=8892559f-e916-8db0-bffa-7d983d121da6" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://android.opensourceror.org/2009/12/23/emulator-frustrations-for-n00bs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What&#8217;s with the various API levels and types in the SDK?</title>
		<link>http://android.opensourceror.org/2009/12/22/whats-with-the-various-api-levels-and-types-in-the-sdk/</link>
		<comments>http://android.opensourceror.org/2009/12/22/whats-with-the-various-api-levels-and-types-in-the-sdk/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 20:59:15 +0000</pubDate>
		<dc:creator>luke</dc:creator>
				<category><![CDATA[SDK level 2.0.1]]></category>
		<category><![CDATA[n00b frustrations]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[google apis]]></category>
		<category><![CDATA[sweets]]></category>
		<category><![CDATA[versions]]></category>

		<guid isPermaLink="false">http://android.opensourceror.org/?p=32</guid>
		<description><![CDATA[
(As of SDK 2.0.1)
The API levels 1.0 through 2.0.1 are versions of the framework with which you develop Android applications (see http://developer.android.com/guide/appendix/api-levels.html for more). They&#8217;re fairly backward compatible but not completely. These are also referred to by integer API numbers and sometimes names:

1 = version 1.0
2 = version 1.1
3 = version 1.5 (Cupcake)
4 = version [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>(As of SDK 2.0.1)</p>
<p>The API levels 1.0 through 2.0.1 are versions of the framework with which you develop Android applications (see <a href="http://developer.android.com/guide/appendix/api-levels.html" target="_blank">http://developer.android.com/guide/appendix/api-levels.html</a> for more). They&#8217;re fairly backward compatible but not completely. These are also referred to by integer API numbers and sometimes names:</p>
<ul>
<li>1 = version 1.0</li>
<li>2 = version 1.1</li>
<li>3 = version 1.5 (Cupcake)</li>
<li>4 = version 1.6 (Donut)</li>
<li>5 = version 2.0 (Eclair)</li>
<li>6 = version 2.0.1</li>
</ul>
<p><a href="http://android.opensourceror.org/wp-content/uploads/2009/12/various_apis.png"><img class="aligncenter size-full wp-image-33" title="various_apis" src="http://android.opensourceror.org/wp-content/uploads/2009/12/various_apis.png" alt="various_apis" width="745" height="462" /></a></p>
<p>The devices out there may be one of several different versions. At the time of writing, my stock T-Mobile G1 is at 1.6 (and may never get 2.0 as evidently the memory requirements are prohibitive). The Droid runs 2.0. I seem to recall hearing of another phone that was still stuck on 1.5 (the Cliq?). If you want to know the relative percentages of what&#8217;s out there, check the <a href="http://developer.android.com/resources/dashboard/platform-versions.html" target="_blank">Platform Versions Dashboard</a>.</p>
<p>When you develop an application, you have to specify what API level you&#8217;re developing for. Then the device will know whether it can support your application. For the widest support you&#8217;ll want the earliest feasible API (probably 1.5 for now), but then you&#8217;re missing out on the features of later APIs.</p>
<p>When you&#8217;re selecting the &#8220;target&#8221; for creating an emulator or developing an app, you also have a choice of developing against the <a href="http://code.google.com/android/add-ons/google-apis/index.html" target="_blank">Google APIs</a> or not. These add more libraries for your application to use &#8211; currently, this is basically just if you want to integrate Google Maps into your application; later versions of the API may have other useful libraries. The language of &#8220;Google API&#8221; is a bit confusing when added to SDK/Android API versioning.<span> It&#8217;s added functionality on top of the standard Android platform &#8211; each &#8220;Google APIs&#8221; target also includes the API platform with the number given.<br />
</span></div>
]]></content:encoded>
			<wfw:commentRss>http://android.opensourceror.org/2009/12/22/whats-with-the-various-api-levels-and-types-in-the-sdk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Eclipse ADT plugin for creating projects says I need to choose a target, but there&#8217;s nowhere to choose a target!</title>
		<link>http://android.opensourceror.org/2009/12/14/the-eclipse-adt-plugin-for-creating-projects-says-i-need-to-choose-a-target-but-theres-nowhere-to-choose-a-target/</link>
		<comments>http://android.opensourceror.org/2009/12/14/the-eclipse-adt-plugin-for-creating-projects-says-i-need-to-choose-a-target-but-theres-nowhere-to-choose-a-target/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 15:03:48 +0000</pubDate>
		<dc:creator>luke</dc:creator>
				<category><![CDATA[ADT plugin]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[SDK level 2.0.1]]></category>
		<category><![CDATA[n00b frustrations]]></category>
		<category><![CDATA[ADT]]></category>
		<category><![CDATA[build target]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[dialog]]></category>

		<guid isPermaLink="false">http://android.opensourceror.org/?p=26</guid>
		<description><![CDATA[This was a particularly frustrating one, but it&#8217;s really simple to resolve.


This is a simple problem of screen real estate. When the dialog is not long enough vertically, the part that is shrunk (down to nothing!) to fit is the Build Target selection box. The only way to get it to show up is to [...]]]></description>
			<content:encoded><![CDATA[<p>This was a particularly frustrating one, but it&#8217;s really simple to resolve.</p>
<div style="width: auto; height: auto;"></div>
<div style="width: auto; height: auto;">
<div id="attachment_29" class="wp-caption alignnone" style="width: 535px"><img class="size-full wp-image-29" title="No build targets??" src="http://android.opensourceror.org/wp-content/uploads/2009/12/new_project_no_build.png" alt="Creating a project - how do I specify the build target when none is listed??? " width="525" height="652" /><p class="wp-caption-text">Creating a project - how do I specify the build target when none is listed??? </p></div>
<p>This is a simple problem of screen real estate. When the dialog is not long enough vertically, the part that is shrunk (down to nothing!) to fit is the Build Target selection box. The only way to get it to show up is to expand the dialog vertically &#8211; you may have to increase your screen resolution to fit it all in (I found this out while working on an Eee PC &#8211; a screen height of 600 pixels won&#8217;t cut it!).</p></div>
<div style="width: auto; height: auto;">
<p>For completeness, I should probably mention that your SDK comes with no build targets &#8211; you have to download some after unzipping it. But if that&#8217;s your problem, you should still see a white space in the Build Target selection box where the targets would be.</p></div>
<div style="width: auto; height: auto;">
<p>This is a pretty strange design problem. Seems to me it would make more sense to occlude the bottom of the dialog in this situation rather than something essential in the middle. Or just put a scrollbar on the dialog!? I found a few other people complaining about this problem.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://android.opensourceror.org/2009/12/14/the-eclipse-adt-plugin-for-creating-projects-says-i-need-to-choose-a-target-but-theres-nowhere-to-choose-a-target/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>My emulator looks different than in the examples!</title>
		<link>http://android.opensourceror.org/2009/12/08/my-emulator-looks-different-than-in-the-examples/</link>
		<comments>http://android.opensourceror.org/2009/12/08/my-emulator-looks-different-than-in-the-examples/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 00:22:28 +0000</pubDate>
		<dc:creator>luke</dc:creator>
				<category><![CDATA[SDK level 2.0]]></category>
		<category><![CDATA[emulator]]></category>
		<category><![CDATA[n00b frustrations]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[skins]]></category>

		<guid isPermaLink="false">http://android.opensourceror.org/?p=8</guid>
		<description><![CDATA[
Illustrations of emulator usage in books and on the web have emulator skins that look like devices, but if your SDK is at all recent, the emulator doesn&#8217;t look like that &#8211; the screen is bare. This is a seemingly insignificant thing, but strangely no one seems to talk about it. I didn&#8217;t find any [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>Illustrations of emulator usage <a href="http://www.manning.com/ableson/" target="_blank">in books</a> and <a href="http://blogspot.fluidnewmedia.com/2009/04/displaying-google-maps-in-the-android-emulator/" target="_blank">on the web</a> have emulator skins that look like devices, but if your SDK is at all recent, the emulator doesn&#8217;t look like that &#8211; the screen is bare. This is a seemingly insignificant thing, but strangely no one seems to talk about it. I didn&#8217;t find any documentation explaining this &#8211; I had to ask like a n00b on the IRC channel. Well, to save you the embarrassment &#8211; it&#8217;s pretty simple. For the API 1.5 and before, the emulator looks like a device. For 1.6 and after, it doesn&#8217;t. If you really want your emulator to look like that, you need to use an emulator targeted at 1.5 or before &#8211; as far as I can tell, there&#8217;s no setting you can use to configure 1.6 or 2.0 to show the device skin from 1.5.</p>
<div style="width: auto; height: auto;">
<div class="wp-caption aligncenter" style="width: 1034px"><img title="Emulator skins" src="https://wave.googleusercontent.com/wave/attachment/emulator-skins.png?id=bVzvsH3f13&amp;key=AH0qf5x26L6IQH5VA7Gj1QLzbYw-TfgOjw" alt="Emulators for versions 1.5 and 1.6" width="1024" height="577" /><p class="wp-caption-text">Emulators for versions 1.5 and 1.6</p></div>
</div>
<p><span style="&quot;full&quot;&gt;&lt;w:caption&gt;Emulators"> </span><span> </span></div>
]]></content:encoded>
			<wfw:commentRss>http://android.opensourceror.org/2009/12/08/my-emulator-looks-different-than-in-the-examples/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Missing dependencies for the Eclipse ADT plugin</title>
		<link>http://android.opensourceror.org/2009/12/07/missing-dependencies-for-the-eclipse-adt-plugin/</link>
		<comments>http://android.opensourceror.org/2009/12/07/missing-dependencies-for-the-eclipse-adt-plugin/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 13:26:43 +0000</pubDate>
		<dc:creator>luke</dc:creator>
				<category><![CDATA[ADT plugin]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[SDK level 2.0]]></category>
		<category><![CDATA[n00b frustrations]]></category>

		<guid isPermaLink="false">http://android.opensourceror.org/?p=3</guid>
		<description><![CDATA[When installing the plugin, depending on your setup, Eclipse may fail with a message that dependencies are missing.
]]></description>
			<content:encoded><![CDATA[<p>When installing the plugin, depending on your setup, Eclipse may fail with a message that dependencies are missing.</p>
<div style="width: auto; height: auto;">
<div class="wp-caption aligncenter" style="width: 747px"><img title="Dependency missing" src="https://wave.googleusercontent.com/wave/attachment/ADT_install_fail.png?id=6aACraaZ2&amp;key=AH0qf5wFAEUN_8OIViTLNCJ12R9_Lvx9Lg" alt="com.android.ide.eclipse.adt.feature.group requires org.eclipse.wst.xml.ui 0.0.0 but it could not be found" width="737" height="525" /><p class="wp-caption-text">com.android.ide.eclipse.adt.feature.group requires &#39;org.eclipse.wst.xml.ui 0.0.0&#39; but it could not be found</p></div>
</div>
<p>Unless your Eclipse is too old (the plugin requires 3.4 or above) this is not really a problem with Eclipse, the SDK, or ADT, but rather how various operating systems package Eclipse. The appropriate components need to be installed or Eclipse needs to be configured with the appropriate software update site for its version so that it can resolve dependencies for you.<span id="more-3"></span></p>
<p>For eclipse 3.5 (galileo) the appropriate update site is <a href="http://download.eclipse.org/releases/galileo" target="_blank">http://download.eclipse.org/releases/galileo</a> &#8211; if it is missing, you add it in the same place you add the plugin:</p>
<div style="width: auto; height: auto;">
<div class="wp-caption aligncenter" style="width: 672px"><img title="Eclipse update site" src="https://wave.googleusercontent.com/wave/attachment/Adding_update_site.png?id=6aACraaZ3&amp;key=AH0qf5zL5_VZlxgXIeps1233IcP_4jnnNA" alt="Adding the Galileo (Eclipse 3.5) update site" width="662" height="556" /><p class="wp-caption-text">Adding the Galileo (Eclipse 3.5) update site</p></div>
</div>
<p><strong>OS-specific experiences</strong></p>
<p>Under Windows, using the Java Developers version of Eclipse, I had no problems.</p>
<p>In Ubuntu 9.10 the default Eclipse install from the Ubuntu Software Center is almost useless. You need to use Synaptic to add to Eclipse after the default install is done; add the eclipse-jdt package. You also need to add the update site as above &#8211; it comes with none configured.</p>
<p>In Fedora, after installing elipse-platform and eclipse-jdt, I needed to go to Eclipse&#8217;s Software Sites dialog and enable the base site that was already there but disabled.</p>
<p>I haven&#8217;t tried it on Mac OS X; it probably just works, but comment here if that&#8217;s not so.<span><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://android.opensourceror.org/2009/12/07/missing-dependencies-for-the-eclipse-adt-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
