0

hello i cannt build apk becaues this error who can solve this problem to me . "note" , just i opend anew map project then build apk then it show me this error

Information:BUILD FAILED
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_102\bin\java.exe'' finished with non-zero exit value 2
:app:transformClassesWithDexForDebug FAILED
Error:The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
For more information see https://docs.gradle.org/current/userguide/build_environment.html
To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties.
For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB.
It currently has approximately 910 MB.
To run dex in process, the Gradle daemon needs a larger heap.
Nouman Ghaffar
  • 3,780
  • 1
  • 29
  • 37
  • @omar samara please post your build.gradle file dependency section – Sahil Manchanda Oct 20 '16 at 08:40
  • dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:24.2.1' compile 'com.google.android.gms:play-services:9.6.1' compile 'com.android.support:multidex:1.0.0' – omar samara Oct 20 '16 at 12:24

1 Answers1

1

for me it was enough to enable multidex option in gradle

...   
 defaultConfig {

            ...
            multiDexEnabled true
    ...
        }
...