Configure your mac (or ubuntu) for sending debugging (android) reports

0

Recently I blogged about setting up your mac for “non development work” so that you can test your android app’s without a android app. A very important part to this the ability to send crash reports. As we all know android has some wonderful tools for debugging. So for your business managers who care only about your requirements and delivery, sending effective crash reports is very important.

Think of it like this, if you send a effective crash report the developer can fix issues quicker smarter and “Exactly” for what you faced. Its a 2 way street really. Right ?

That said, the developer too needs to add debug information to the debugger. Android has a debugger called “ddms”. Lets get to it.

– Download this file “http://dl.google.com/android/android-sdk_r10-mac_x86.zip” to a directory
– Extract all files
– cd android-sdk-mac_x86/tools
– ./ddms
– Wait a while for the log to update
– Reproduce the issues, wait for the app to crash.
– Click on the “scrolling text below”
– “Select All” text
– Copy Paste into a text file
– Send the text file to all your developers.

Hope this helps. Please comment if you it does not.

HttpURLConnection connect returns unknownhostexception

0

This is what you get when you dont enable INTERNET permission in your android manifest file.

05-06 07:07:55.984: WARN/System.err(1006): java.net.UnknownHostException: gdata.youtube.com
05-06 07:07:55.984: WARN/System.err(1006):     at java.net.InetAddress.lookupHostByName(InetAddress.java:506)
05-06 07:07:55.984: WARN/System.err(1006):     at java.net.InetAddress.getAllByNameImpl(InetAddress.java:294)
05-06 07:07:55.984: WARN/System.err(1006):     at java.net.InetAddress.getAllByName(InetAddress.java:256)
05-06 07:07:55.984: WARN/System.err(1006):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.<init>(HttpConnection.java:68)
05-06 07:07:55.984: WARN/System.err(1006):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.<init>(HttpConnection.java:48)
05-06 07:07:55.984: WARN/System.err(1006):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection$Address.connect(HttpConnection.java:298)
05-06 07:07:55.984: WARN/System.err(1006):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get(HttpConnectionPool.java:89)
05-06 07:07:55.984: WARN/System.err(1006):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHttpConnection(HttpURLConnectionImpl.java:285)
05-06 07:07:55.984: WARN/System.err(1006):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.makeConnection(HttpURLConnectionImpl.java:267)
05-06 07:07:55.984: WARN/System.err(1006):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:205)

To fix it add the following into the androidmanifest.xml file.

<uses-permission android:name="android.permission.INTERNET" />

android emulator INSTALL_FAILED_INSUFFICIENT_STORAGE

0

Kept getting this annoying message when I tried to install a app close to 20Mb.

Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE

Simple fix actually, In your Run or Debug Configuration, Target tab, scroll down, in the edit box of “additional emulator command line options” add the below

-partition-size 1024

Restart your emulator, should work.