I am not able to generate apk file it shows this error: duplicate declaration of back

This is unreadable.

Show us the bottom of the error log.

It's probably the app icon.
Remove it.

I can very faintly make out what I think is "duplicate declaration of back".

See the post I've linked above.