If you indeed runing build with gradle you need to configure
signingConfigs. Android can configure your debug signingConfig
automatically. You can make release
signingConfig in a next
Check manual on this topic here: http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Signing-Configurations
If you still have issues, please update question with your
build.gradle. Most likely issue is laying here. I'm using JDK
1.7 and gradle builds are working fine.