Sunday, September 30, 2012

Android build on Ubuntu 64

After fiddling with what should have been a trivial matter (i.e., following directions on android.com) I kept running into:
user@AndroidBuilder:~/android_src/out/host/linux-x86/bin$ ANDROID_SWT=/home/user/android_src/prebuilts/tools/linux-x86_64/swt ./android avd
using /home/user/android_src/out/host/linux-x86/framework/sdkmanager.jar:/home/user/android_src/out/host/linux-x86/framework/swtmenubar.jar:/home/user/android_src/prebuilts/tools/linux-x86_64/swt/swt.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.widgets.Display.(Unknown Source)
at com.android.sdkmanager.Main.showAvdManagerWindow(Main.java:354)
at com.android.sdkmanager.Main.doAction(Main.java:307)
at com.android.sdkmanager.Main.run(Main.java:118)
at com.android.sdkmanager.Main.main(Main.java:101)
I searched high and low, and finally decided to edit the out/host/linux-x86/bin/android script, swapping the classpath order to -classpath "$swtpath/swt.jar:$jarpath" \ (i.e, put the swtpath first).  Note from my invocation of the android script that ANDROID_SWT (and therefor $swtpath) is pointing to prebuilts/tools/linux-x86_64/swt.  However, if I let the jarpath come first, java wants to use the wrong swt.  With this tweak, instead of a stack trace, I get:


It's also annoying to install jdk6 on Ubuntu 12.04.  I blame Oracle...


Wednesday, August 15, 2012

Shopping part 2. Happy ending.

48 hours ago, I received a 'final' notice from Amazon stating that my return request had been denied and no further action would be taken. I thought about it a bit, and wrote up my thoughts on the situation.

This morning, an Amazon representative called my cell phone and talk with me. Within 10 minutes a return had been arranged and the representative applied a promotional credit to my Amazon account.

The Internet is an interesting place.

Tuesday, August 14, 2012

Shopping

This weekend I walked out of Lowes (empty handed) and made my purchase on-line.  Why?  After an hour of looking for cork board, with the 'help' of a few employees, I finally realized they didn't have any.  (At least they didn't add insult to injury by saying 'we can order that for you'...)  The employees weren't able to tell me if they had a product; so I left my cart with the few items I had found and took my money elsewhere.

For me, Amazon has been a model shopping experience for years now. (I was any early 'Prime' customer.)  It's so simple:
  1. search for my item
  2. press the Prime button
  3. pick the result I like
  4. click 'Add to Cart'
  5. within 1 or 2 days the product shows up (with free shipping)
Instead of spending an hour or more driving and finding out a store doesn't have something, I'm done in a minute or two.  And if any thing is wrong with the product, returns are easy.

A couple weeks ago, however, this process broke down.  It seems that step #2 (above) is happy to yield products not covered by Prime.  The product I ordered (using my trusty work flow) had free shipping, so everything seemed fine.  But it didn't arrive in 1 or 2 days; it arrived 5 days later - after we had left for a trip.  No problem; I presumed I could simply return it for not arriving on time.

I was wrong; my 'Prime' search had yielded a product not covered by Amazon or their 2-day shipping guarantee.  I called Amazon and was unhappy with the tone and message they conveyed.  I was told that pressing the 'Add to Cart' button is not the right method; you need to specifically select a vendor (from a series of smaller, less noticeable buttons) to ensure you get Prime shipping.  You also need to double check the final order.  I told him I've been doing this a long time, and it was them who had changed, not me.  He said 'sorry'. I also received a terse e-mail from Amazon saying there is nothing more to discuss.

Lesson?  With the exception of BestBuy, I don't think I would have received this sort of treatment from any brick-and-mortar store I know.  Maybe there is hope for the old way of doing things.  Maybe I'll give up a bit of convenience to work with local shops a bit more.