Reputation: 335
`com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_40\bin\java.exe'' finished with non-zero exit value 2`
Also, there's a compile error that says
AGPBI: {"kind":"simple","text":"UNEXPECTED TOP-LEVEL EXCEPTION:","sources":[{}]}
AGPBI: {"kind":"simple","text":"com.android.dex.DexException: Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode;","sources":[{}]}
AGPBI: {"kind":"simple","text":"\tat com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)","sources":[{}]}
AGPBI: {"kind":"simple","text":"\tat com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)","sources":[{}]}
AGPBI: {"kind":"simple","text":"\tat com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)","sources":[{}]}
AGPBI: {"kind":"simple","text":"\tat com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)","sources":[{}]}
AGPBI: {"kind":"simple","text":"\tat com.android.dx.merge.DexMerger.merge(DexMerger.java:189)","sources":[{}]}
AGPBI: {"kind":"simple","text":"\tat com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)","sources":[{}]}
AGPBI: {"kind":"simple","text":"\tat com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)","sources":[{}]}
AGPBI: {"kind":"simple","text":"\tat com.android.dx.command.dexer.Main.run(Main.java:246)","sources":[{}]}
AGPBI: {"kind":"simple","text":"\tat com.android.dx.command.dexer.Main.main(Main.java:215)","sources":[{}]}
AGPBI: {"kind":"simple","text":"\tat com.android.dx.command.Main.main(Main.java:106)","sources":[{}]}
I attempted to import a project from Eclipse into Android Studio but it returned a strange error. Here's one gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}
}
allprojects {
repositories {
jcenter()
}
}
and here's another gradle, named 'app'
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.thisisanapp"
minSdkVersion 11
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:21.0.3'
compile 'com.google.android.gms:play-services:+'
compile 'com.android.support:appcompat-v7:19.1.0'
compile files('libs/google-play-services.jar')
compile files('libs/Parse-1.8.2.jar')
}
and another gradle named 'settings.gradle'
include ':app'
This app uses the Google Maps library, as well as some Parse. How do I configure Android Studio to run the app?
Upvotes: 0
Views: 171
Reputation: 1007543
Remove:
compile files('libs/google-play-services.jar')
from your dependencies
closure, and delete the JAR. Stick with the artifact ('com.google.android.gms:play-services:+'
), though you may wish to go with something a bit more fine-grained and with an actual version number. See the Play Services SDK setup documentation, particularly the "Selectively compiling APIs into your executable" section.
Upvotes: 1