<?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; SDK level 2.0.1</title>
	<atom:link href="http://android.opensourceror.org/category/sdk-level-2-0-1/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>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>
	</channel>
</rss>

