android

Gradle from behind a proxy, part deux

In July I wrote a post documenting how to build a project in Android Studio from behind a proxy. Essentially you need to tell Gradle Studio your proxy settings. As of updating to Android Studio 1.0, the issue has come back! After a combination of swearing and research I’ve found the missing necessary steps. So the new definitive steps for getting Gradle working from behind a proxy Navigate to the… Read More »Gradle from behind a proxy, part deux

Debugger this! Debugging an Android Service

I recently found out that I couldn’t hit any breakpoints in an Android Service I was developing. I found that this was easily sorted by adding the following line: android.os.Debug.waitForDebugger() This approach was suggested on various websites including StackOverflow and HelloAndroid amongst many. Great. I found out much later than when I ran the code “in the wild” i.e. in a production environment unattached to a debugger, my application was… Read More »Debugger this! Debugging an Android Service

Android Studio – Fix sudden unresolved symbols

Android Studio is a fickle beast. At times surprisingly clever and useful, and other times a flaky nightmare. The most recent issue I came across was when a Google Glass project suddenly stopped building with unresolved symbol errors. This manifests itself as all your “com.google.android.glass.*” imports failing, and the resulting use of any object from those libs causing compilation errors. How to fix it Eventually I checked my project dependencies… Read More »Android Studio – Fix sudden unresolved symbols

Using Gradle from behind a proxy

By default Android Studio uses Gradle to build Android projects. This means Android Studio always needs a connection to the internet to check for and retrieve dependencies. If you’re developing from behind a proxy (as I am) then you’ll have to explicitly tell Gradle the proxy details to allow it to connect to its servers. Steps to fix Navigate to the “.gradle” folder in your user directory (e.g. C:\Users\bob\.gradle) Create a “gradle.properties” file… Read More »Using Gradle from behind a proxy