Error messages like:
Too many field references: 131000; max is 65536.
Or
Unable to execute dex: method ID not in [0, 0xffff]: 65536
Means that you have skipped the multidex setup. Just do multidex setup to fix this:
OR
Decrease number of method references by removing appmediation partners libraries from the project.