{"id":1845,"date":"2010-12-05T23:44:46","date_gmt":"2010-12-06T07:44:46","guid":{"rendered":"https:\/\/mathpirate.net\/log\/?p=1845"},"modified":"2010-12-05T23:58:30","modified_gmt":"2010-12-06T07:58:30","slug":"but-i-dont-wanna-install-eclipse","status":"publish","type":"post","link":"https:\/\/mathpirate.net\/log\/2010\/12\/05\/but-i-dont-wanna-install-eclipse\/","title":{"rendered":"But I Don&#8217;t Wanna Install Eclipse&#8230;!"},"content":{"rendered":"<p>Last week, I got an Android phone, the Droid X.\u00c2\u00a0 I want to try developing on it, because I have a few ideas for programs I&#8217;d like to have in my pocket all the time.\u00c2\u00a0 Ideally, I&#8217;d do it all in a &#8220;Crazy Weekend Project&#8221; format, unfortunately, I don&#8217;t seem to have to ability to dedicate five days in a row toward a single goal right now.\u00c2\u00a0 ((Half of it is the after effects of moving to a new house earlier this year, the other half are called the Wii and the XBox360 and my general video game obsession.))\u00c2\u00a0 I do, however, have bits and pieces of time here and there that I can use.\u00c2\u00a0 I know that if I don&#8217;t force myself to get started on something, I never will.\u00c2\u00a0<\/p>\n<p>Just ask that Mac Mini I bought in April in order to try iPhone\/iPod development.\u00c2\u00a0 It&#8217;s still sitting unused in its box, waiting for a Crazy Weekend Project that&#8217;ll probably never come.\u00c2\u00a0 ((After all, there&#8217;s no Haggle to write a Haggle app for anymore&#8230;))<\/p>\n<p><a href=\"https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/MacMini.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-1848\" title=\"MacMini\" src=\"https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/MacMini-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/MacMini-300x225.jpg 300w, https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/MacMini-1024x768.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>So, here I am, just getting started and making it happen.<\/p>\n<p>But&#8230;\u00c2\u00a0 I don&#8217;t wanna install Eclipse!<\/p>\n<p>You can&#8217;t make me!<\/p>\n<p>Please&#8230;\u00c2\u00a0 Please don&#8217;t.<\/p>\n<p><a href=\"https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/Eclipse.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-1846\" title=\"Eclipse\" src=\"https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/Eclipse-300x200.png\" alt=\"\" width=\"300\" height=\"200\" srcset=\"https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/Eclipse-300x200.png 300w, https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/Eclipse-1024x685.png 1024w, https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/Eclipse.png 1344w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Ah crap.<\/p>\n<p>I had to use Eclipse at work years ago.\u00c2\u00a0 It could charitably be described as &#8220;broken&#8221; on a good day.\u00c2\u00a0 Now, to be fair, I&#8217;m not sure where the brokenness came from, whether the program was just bad or if it was a side effect of the fact that my installation was a directory copy from a co-worker&#8217;s machine.\u00c2\u00a0 Either way, it didn&#8217;t work.\u00c2\u00a0 At one point I tried switching projects and it freaked out and lost the entire concept of packages.\u00c2\u00a0 It took me two hours before I was even able to convince it that it understood Java code.\u00c2\u00a0 I also remember searching being extraordinarily painful, but I don&#8217;t know why.<\/p>\n<p>On the other hand, at least I won&#8217;t have to write Objective C.<\/p>\n<div id=\"attachment_1847\" style=\"width: 235px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/NeXTStep.jpg\"><img aria-describedby=\"caption-attachment-1847\" decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-1847 \" title=\"NeXTStep\" src=\"https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/NeXTStep-225x300.jpg\" alt=\"\" width=\"225\" height=\"300\" srcset=\"https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/NeXTStep-225x300.jpg 225w, https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/NeXTStep-768x1024.jpg 768w\" sizes=\"(max-width: 225px) 100vw, 225px\" \/><\/a><p id=\"caption-attachment-1847\" class=\"wp-caption-text\">Yes. I own a copy of NeXTstep. nerdScore++;<\/p><\/div>\n<p>It&#8217;s not just Eclipse.\u00c2\u00a0 It&#8217;s JDKs, JREs, AVDs,\u00c2\u00a0SDKs, ADKs, MREs and STDs.\u00c2\u00a0 The quick start here has pointers to the stuff you&#8217;ll need:\u00c2\u00a0 <a href=\"http:\/\/developer.android.com\/sdk\/index.html\">http:\/\/developer.android.com\/sdk\/index.html<\/a><\/p>\n<p>Of course, it&#8217;s open source documentation which is usually awesome in the way it leaves out important information and glosses over critical steps.<\/p>\n<p>Step 1: Easy.<\/p>\n<p>Step 2: Easy.<\/p>\n<p>Step 3:\u00c2\u00a0WTF?<\/p>\n<p>The quick start goes very sideways here at step 3.\u00c2\u00a0 It tells you to &#8220;set up a remote update site&#8221;.\u00c2\u00a0 Which would probably be easy, if such a thing existed.\u00c2\u00a0 But it doesn&#8217;t.\u00c2\u00a0 You can look through all of the menus and property\u00c2\u00a0items in Eclipse, but it&#8217;s not there.\u00c2\u00a0 What they mean by &#8220;remote update site&#8221; is that you should go to &#8220;Help-&gt;Install New Software&#8230;&#8221; and put that URL in there.\u00c2\u00a0 After that, make sure the box next to &#8220;Developer Tools&#8221; is checked and go through the wizard to download and install those packages.\u00c2\u00a0 Once that&#8217;s done, go to &#8220;Window-&gt;Preferences&#8230;-&gt;Android&#8221; and set the SDK path.<\/p>\n<p>Step 4 is also a bit on\u00c2\u00a0the wonky side, but with enough fiddling, you&#8217;ll probably get it sorted out.\u00c2\u00a0 You see, even though you just spent twenty minutes installing and configuring Android SDKs, you still don&#8217;t actually have the SDK for any of the Android platforms.\u00c2\u00a0 You still have to download and install those packages, too.\u00c2\u00a0 To do that, go to &#8220;Window-&gt;Android SDK and AVD Manager&#8221;, then select &#8220;Available Packages&#8221;.\u00c2\u00a0 You should have a tree that you can expand and see various packages that you can download.\u00c2\u00a0 At a bare minimum, you&#8217;ll need to pick one of the &#8220;SDK Platform Android&#8221; versions, probably either the latest one or the one that matches your device.\u00c2\u00a0 I think the Google APIs are needed for maps and some of the other Google tools, but I haven&#8217;t played around with any of those yet.<\/p>\n<p>Now you&#8217;re probably ready to go.\u00c2\u00a0 You should be able to create a new Android project.\u00c2\u00a0 I have no idea what any of the fields on the wizard are, so I&#8217;m not going to bother attempting to explain them because I&#8217;d probably be wrong.<\/p>\n<p>Once I created the project, I immediately got an error about R.java not being found, even though a quick check through the package manager showed that it&#8217;s there.\u00c2\u00a0 ((Looks like it might be Eclipse that&#8217;s broken after all&#8230;)) \u00c2\u00a0A Project-&gt;Clean&#8230; took care of the problem for me, and then I was able to build ((No CTRL-SHIFT-B!\u00c2\u00a0 ARGH!)) and run the sample project.<\/p>\n<p>Well, at least, that&#8217;s what you&#8217;d expect to have happen, but nope.\u00c2\u00a0 See, there&#8217;s no Android Devices to run it on.\u00c2\u00a0 ((Never mind that it would probably be fairly easy to include a reference\u00c2\u00a0device or two, this is Open Source, why do anything for the user if the user can .\/configure, make, make install and make configure it\u00c2\u00a0for themselves?))\u00c2\u00a0\u00c2\u00a0You have to set up an emulator AVD before you can begin.\u00c2\u00a0 Go back to the SDK and AVD manager and click &#8220;New&#8221;.\u00c2\u00a0 That&#8217;ll pop up a dialog where you can give it a name and specs.\u00c2\u00a0 Several warnings:<\/p>\n<ol>\n<li>The Name can&#8217;t have spaces.<\/li>\n<li>It appears to pre-allocate the SD card file, so don&#8217;t create a 16384 MB (Sorry, MiB&#8230;) SD card like I tried to do, or the process will kick off &#8220;mksdcard.exe&#8221; which will take forever and fill up your hard drive.\u00c2\u00a0 I went with 256MB.\u00c2\u00a0 I know know if that&#8217;s too small, but whatever, I&#8217;ll find out later.<\/li>\n<li>Under hardware, you&#8217;ll want to enable some of the hardware bits you might want to develop against, although I&#8217;m not quite sure yet just how exactly the emulated GPS or accelerometers are supposed to work&#8230;<\/li>\n<li>No, I have no idea what in the hell &#8220;Abstracted LCD Density&#8221; means.<\/li>\n<\/ol>\n<p>After you hit &#8220;Create AVD&#8221;, it&#8217;ll churn for a bit and give you an emulator image you can use.\u00c2\u00a0 And, of course, nothing has changed since my days on the Windows CE team ((Platform Builder test team, WinCE 5.0 and Windows Mobile 5, 2003-2004, mostly focused on the CE emulator integration)):\u00c2\u00a0 Mobile Device Emulators are slow.\u00c2\u00a0 Really really freaking slow.\u00c2\u00a0 It&#8217;s usually faster to use a physical device, if you dare.<\/p>\n<p>After a very long boot process&#8230;<\/p>\n<p><a href=\"https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/ANDROID_.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1852\" title=\"ANDROID_\" src=\"https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/ANDROID_.png\" alt=\"\" width=\"193\" height=\"69\" \/><\/a><\/p>\n<p>&#8230;your program will run and do this:<\/p>\n<p><a href=\"https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/OffToAGoodStart.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-1853\" title=\"OffToAGoodStart\" src=\"https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/OffToAGoodStart-300x185.png\" alt=\"\" width=\"300\" height=\"185\" srcset=\"https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/OffToAGoodStart-300x185.png 300w, https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/OffToAGoodStart.png 443w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Well, it looks like I&#8217;m off to a good start!\u00c2\u00a0 ((BTW, I don&#8217;t actually have any idea what I&#8217;m doing, so if you&#8217;re looking for help, you&#8217;re probably in the wrong place&#8230;\u00c2\u00a0 Don&#8217;t try any of this at home without getting a second opinion first.)) \u00c2\u00a0Can&#8217;t wait to see what&#8217;s next!<\/p>\n<p>(As this isn&#8217;t a Crazy Weekend Project, don&#8217;t expect frequent updates.\u00c2\u00a0 In fact, don&#8217;t expect any updates at all, that way if I&#8217;m distracted by Shiny Things\u00e2\u201e\u00a2 and never come back to this, you won&#8217;t be waiting around forever&#8230;)<\/p>\n<p>By the way, while you&#8217;re in the emulator, play around and you&#8217;ll find interesting things.\u00c2\u00a0 Like this:<\/p>\n<p><a href=\"https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/INeedThisOnMyPhone1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1854\" title=\"INeedThisOnMyPhone\" src=\"https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/INeedThisOnMyPhone1.png\" alt=\"\" width=\"480\" height=\"854\" srcset=\"https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/INeedThisOnMyPhone1.png 480w, https:\/\/mathpirate.net\/log\/wp-content\/uploads\/2010\/12\/INeedThisOnMyPhone1-168x300.png 168w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<p>I NEED THIS ON MY PHONE!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last week, I got an Android phone, the Droid X.\u00c2\u00a0 I want to try developing on it, because I have a few ideas for programs I&#8217;d like to have in my pocket all the time.\u00c2\u00a0 Ideally, I&#8217;d do it all in a &#8220;Crazy Weekend Project&#8221; format, unfortunately, I don&#8217;t seem to have to ability to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[176],"tags":[177,178],"_links":{"self":[{"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/posts\/1845"}],"collection":[{"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/comments?post=1845"}],"version-history":[{"count":8,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/posts\/1845\/revisions"}],"predecessor-version":[{"id":1860,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/posts\/1845\/revisions\/1860"}],"wp:attachment":[{"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/media?parent=1845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/categories?post=1845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/tags?post=1845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}