java - Android Studio libgx project throw Exception, when "compile 'com.google.android.gms:play-services:8.4.0'" add in my project? -


i create libgdx project in android studio. , want add admob banner in project. add lines in build.grandle(project: myapplication):

project(":android") {         apply plugin: "android"         configurations { natives }         dependencies {             /*some codes...*/             compile 'com.android.support:appcompat-v7:23.1.1'            compile 'com.google.android.gms:play-services:8.4.0'       } } 

and error:

unexpected top-level exception: error:execution failed task ':android:transformclasseswithdexfordebug'. com.android.build.api.transform.transformexception: com.android.ide.common.process.processexception: org.gradle.process.internal.execexception: process 'command 'c:\program files\java\jdk1.7.0_79\bin\java.exe'' finished non-zero exit value 2 

enter image description here

normally, when created android studio project , put need code line project admob, works. dont fix problem lingdx project.

enter image description here

try adding lines build.gradle

dexoptions {     incremental true     javamaxheapsize "2g" } 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -