update to new build tools and SDK
update sample app to be less error-prone