Update to sdk 17 and fix a bug so that source can build in Android Studio.