Closed mliell closed 8 years ago
Hi @mliell , have you tried to clean your project and rebuild it. If this does not solve your problem, could you paste your build script(build.gralde
of your app).
Thanks for helping @wangmengyan95
It is a new project ... Gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "tk.lsystem.blingapp"
minSdkVersion 9
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.0.1'
compile project(':Parse-1.10.1')
// Module dependency on ParseLoginUI library sources
compile project(':ParseLoginUI')
}
ext {
compileSdkVersion = 21
buildToolsVersion = "21.1.1"
minSdkVersion = 9
targetSdkVersion = 21
facebookSDK = 'com.facebook.android:facebook-android-sdk:4.0.1'
androidSupport = 'com.android.support:support-v4:22.0.0'
bolts = 'com.parse.bolts:bolts-android:1.2.0'
parse = 'com.parse:parse-android:1.10.0'
parseFacebookUtilsPath = "$rootProject.projectDir/ParseLoginUI/libs/ParseFacebookUtilsV4-1.10.0.jar"
parseTwitterUtilsPath = "$rootProject.projectDir/ParseLoginUI/libs/ParseTwitterUtils-1.10.0.jar"
}
Sorry, the requested follows:
Executing tasks: [:app:assembleDebug]
Configuration on demand is an incubating feature. WARNING: Dependency org.json:json:20090211 is ignored for debugAndroidTest as it may be conflicting with the internal version provided by Android. In case of problem, please repackage with jarjar to change the class packages :ParseLoginUI:compileLint :ParseLoginUI:copyReleaseLint UP-TO-DATE :ParseLoginUI:preBuild UP-TO-DATE :ParseLoginUI:preReleaseBuild UP-TO-DATE :ParseLoginUI:checkReleaseManifest :ParseLoginUI:preDebugAndroidTestBuild UP-TO-DATE :ParseLoginUI:preDebugBuild UP-TO-DATE :ParseLoginUI:preDebugUnitTestBuild UP-TO-DATE :ParseLoginUI:preReleaseUnitTestBuild UP-TO-DATE :ParseLoginUI:prepareComAndroidSupportSupportV42200Library UP-TO-DATE :ParseLoginUI:prepareComFacebookAndroidFacebookAndroidSdk401Library UP-TO-DATE :ParseLoginUI:prepareReleaseDependencies :ParseLoginUI:compileReleaseAidl UP-TO-DATE :ParseLoginUI:compileReleaseRenderscript UP-TO-DATE :ParseLoginUI:generateReleaseBuildConfig UP-TO-DATE :ParseLoginUI:generateReleaseAssets UP-TO-DATE :ParseLoginUI:mergeReleaseAssets UP-TO-DATE :ParseLoginUI:generateReleaseResValues UP-TO-DATE :ParseLoginUI:generateReleaseResources UP-TO-DATE :ParseLoginUI:packageReleaseResources UP-TO-DATE :ParseLoginUI:processReleaseManifest UP-TO-DATE :ParseLoginUI:processReleaseResources UP-TO-DATE :ParseLoginUI:generateReleaseSources UP-TO-DATE :ParseLoginUI:processReleaseJavaRes UP-TO-DATE :ParseLoginUI:compileReleaseJavaWithJavac UP-TO-DATE :ParseLoginUI:extractReleaseAnnotations UP-TO-DATE :ParseLoginUI:mergeReleaseProguardFiles UP-TO-DATE :ParseLoginUI:packageReleaseJar UP-TO-DATE :ParseLoginUI:compileReleaseNdk UP-TO-DATE :ParseLoginUI:packageReleaseJniLibs UP-TO-DATE :ParseLoginUI:packageReleaseLocalJar UP-TO-DATE :ParseLoginUI:packageReleaseRenderscript UP-TO-DATE :ParseLoginUI:bundleRelease UP-TO-DATE :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareBlingAppParseLoginUIUnspecifiedLibrary UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE :app:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE :app:generateDebugBuildConfig UP-TO-DATE :app:generateDebugAssets UP-TO-DATE :app:mergeDebugAssets UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources UP-TO-DATE :app:mergeDebugResources UP-TO-DATE :app:processDebugManifest UP-TO-DATE :app:processDebugResources UP-TO-DATE :app:generateDebugSources UP-TO-DATE :app:processDebugJavaRes UP-TO-DATE :app:compileDebugJavaWithJavac :app:compileDebugNdk UP-TO-DATE :app:compileDebugSources :app:preDexDebug :app:dexDebug AGPBI: {"kind":"simple","text":"UNEXPECTED TOP-LEVEL EXCEPTION:","sources":[{}]} AGPBI: {"kind":"simple","text":"com.android.dex.DexException: Multiple dex files define Lcom/parse/AbstractQueryController$1;","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:502)","sources":[{}]} AGPBI: {"kind":"simple","text":"\tat com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)","sources":[{}]} AGPBI: {"kind":"simple","text":"\tat com.android.dx.command.dexer.Main.run(Main.java:277)","sources":[{}]} AGPBI: {"kind":"simple","text":"\tat com.android.dx.command.dexer.Main.main(Main.java:245)","sources":[{}]} AGPBI: {"kind":"simple","text":"\tat com.android.dx.command.Main.main(Main.java:106)","sources":[{}]}
FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:dexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_51\bin\java.exe'' finished with non-zero exit value 2
BUILD FAILED
Total time: 43.93 secs
Did this ever get resolved? I'm struggling with the same issue
Hi @mliell @dexterlohnes , I still can not repo this problem. From my experience, there are two possibilities
compile fileTree(include: ['*.jar'], dir: 'libs')
seems suspicious to me, can you guarantee you do not import duplicated libs to your app? You can use ./gradlew :YourAppModuleName:dependencies
to check the dependencies of your app, make sure there is no conflict libraries.Hello, this error occurred because the dependencies, I had added the lib Parse-1.10.1 and caused conflict with the ParseLoginUI thus only removed this library and it worked. Thank you.
Glad it helps. I will close this issue.
should put it on docs.
I am facing the same problem. This is my build.gradle file
apply plugin: 'com.android.application'
android { compileSdkVersion 23 buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.dada.chatapp"
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile fileTree(dir: 'libs', include: ['Parse-1.10.3.jar']) compile 'com.parse.bolts:bolts-android:1.+' compile 'com.parse:parse-android:1.+' testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.android.support:design:23.0.1' }
And this is the exception I am getting
UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Lcom/parse/AbstractQueryController$1; at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596) at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554) at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535) at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171) at com.android.dx.merge.DexMerger.merge(DexMerger.java:189) at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334) at com.android.dx.command.dexer.Main.run(Main.java:277) at com.android.dx.command.dexer.Main.main(Main.java:245) at com.android.dx.command.Main.main(Main.java:106) Error:Execution failed for task ':app:dexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_80\bin\java.exe'' finished with non-zero exit value 2
I solved the issue with taking off this line compile 'com.parse:parse-android:1.+' & also by adding this line compile fileTree(dir: 'libs', include: ['Parse-*.jar']) under dependencies in build.gradle. Thank You!!!
@MadhujitB It's recommended to remove your *.jar
s and only use Maven dependencies for Parse libraries.
@grantland Thank You!!! Can you help me regarding autocomplete edittext in android from parse?
@MadhujitB Thank you so much. Your solution works perfectly
@keyuls Welcome.
Dude, you are awesome...Thanks
Hello friends!
I'm having the following debug error:
Error:Execution failed for task ':app:dexDebug'.
I followed the manual import as described. What can I do?