fix a duplicate attribute bug
update for gradle