[Android] Compile Error

Error Message:

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘/usr/lib/jvm/java-8-oracle/bin/java’’ finished with non-zero exit value 2

Reason:

Have more than one v4 module.

How to solve:

Add following code to repeated module in AndroidManifest.xml, and left one if needed.

exclude group: ‘com.android.support’, module: ‘support-v4’

For example: