update build tools
Add isValidFragment implementation
Upgrade to API level 20