Since upgrading to Android Studio 3.0, I've had trouble getting 'AppGlideModule' to be recognized. Android Studio doesn't recognize the import
import com.bumptech.glide.module.AppGlideModule;
see here
I have tried updating 'compile' to 'implementation'. I have also tried cleaning and rebuilding the projects, as well as invalidating caches/restarting.
build.gradle (module:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.test"
minSdkVersion 15
targetSdkVersion 26
buildToolsVersion "26.0.2"
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.squareup.okhttp3:okhttp:3.9.0'
implementation 'com.github.bumptech.glide:annotations:4.2.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.2.0'
}
I feel like 'com.github.bumptech.glide:compiler:4.2.0' isn't being recognized and that's why 'GlideAppModule' is throwing an error but I can't figure out why.
EDIT: 'com.github.bumptech.glide:comiler:4.2.0' is the cause of the error. This was working before updating to Android Studio 3.0
stacktrace
Executing tasks: [clean, :app:assembleDebug]
Configuration on demand is an incubating feature.
:clean
:app:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:checkDebugManifest
:app:generateDebugBuildConfig
:app:prepareLintJar UP-TO-DATE
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
:app:createDebugCompatibleScreenManifests
:app:processDebugManifest
:app:splitsDiscoveryTaskDebug
:app:processDebugResources
:app:generateDebugSources
:app:javaPreCompileDebug
:app:compileDebugJavaWithJavac
C:\Users\user\Documents\test\app\src\main\java\com\example\test\MyAppGlideModule.java:4: error: package com.bumptech.glide.module does not exist
import com.bumptech.glide.module.AppGlideModule;
^
C:\Users\user\Documents\test\app\src\main\java\com\example\test\MyAppGlideModule.java:7: error: cannot find symbol
public final class MyAppGlideModule extends AppGlideModule {}
^
symbol: class AppGlideModule
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> java.lang.NullPointerException: element == null
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileDebugJavaWithJavac'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException: element == null
at com.sun.tools.javac.main.Main.compile(Main.java:553)
at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:49)
at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:36)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:99)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:52)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:37)
at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:35)
at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:25)
at org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilationFinalizer.execute(IncrementalCompilationFinalizer.java:39)
at org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilationFinalizer.execute(IncrementalCompilationFinalizer.java:24)
at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:198)
at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:129)
at com.android.build.gradle.tasks.factory.AndroidJavaCompile.compile(AndroidJavaCompile.java:95)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
... 27 more
Caused by: java.lang.NullPointerException: element == null
at com.bumptech.glide.repackaged.com.squareup.javapoet.Util.checkNotNull(Util.java:68)
at com.bumptech.glide.repackaged.com.squareup.javapoet.ClassName.get(ClassName.java:209)
at com.bumptech.glide.annotation.compiler.RequestManagerGenerator.<init>(RequestManagerGenerator.java:83)
at com.bumptech.glide.annotation.compiler.AppModuleProcessor.<init>(AppModuleProcessor.java:42)
at com.bumptech.glide.annotation.compiler.GlideAnnotationProcessor.init(GlideAnnotationProcessor.java:81)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:500)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:597)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:690)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
... 52 more
* Get more help at https://help.gradle.org
BUILD FAILED in 8s
16 actionable tasks: 15 executed, 1 up-to-date
Changing
implementation 'com.github.bumptech.glide:annotations:4.2.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.2.0'
to
implementation 'com.github.bumptech.glide:glide:4.2.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.2.0'
has solved my issue. I don't know how I ended up with a different implementation but there it is.
This is not supported in Kotlin:
annotationProcessor 'com.github.bumptech.glide:compiler:4.2.0'
You need to use Kapt instead of annotationProcessor
kapt 'com.github.bumptech.glide:compiler:4.2.0'
And then
apply plugin: 'kotlin-kapt'
Full code example:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// for facebook sdk conflict
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:support-vector-drawable:26.1.0'
implementation 'com.google.firebase:firebase-ads:11.4.2'
implementation 'com.google.firebase:firebase-database:11.4.2'
implementation 'com.google.firebase:firebase-messaging:11.4.2'
implementation 'com.google.firebase:firebase-auth:11.4.2'
implementation 'com.google.firebase:firebase-crash:11.4.2'
implementation 'com.google.firebase:firebase-config:11.4.2'
implementation 'com.google.firebase:firebase-core:11.4.2'
implementation 'com.google.firebase:firebase-storage:11.4.2'
implementation 'com.google.firebase:firebase-appindexing:11.4.2'
implementation 'com.google.android.gms:play-services-maps:11.4.2'
implementation 'com.google.android.gms:play-services-auth:11.4.2'
implementation 'com.google.android.gms:play-services-location:11.4.2'
implementation 'com.firebase:geofire-android:2.1.2'
implementation 'com.google.maps.android:android-maps-utils:0.5+'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.afollestad.material-dialogs:core:0.9.5.0'
implementation 'com.kila.apprater_dialog.lars:apprater-dialog:1.2.0'
implementation 'com.github.bumptech.glide:glide:4.2.0'
kapt 'com.github.bumptech.glide:compiler:4.2.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.19.3'
androidTestImplementation 'junit:junit:4.12'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-kapt'
repositories {
mavenCentral()
}
Related
Program type already present: org.bouncycastle.LICENSE
Hello Everyone Hope you are doing well.
Here is my question : We are using Two different types of Module library in one project but the scenario is We are getting compilation error of Program type already present: org.bouncycastle.LICENSE & we didn't get where it is. So here we want a solution for how can we fix this issue without deleting or removing any module in our project ? We use this library in one of our module - bcprov-jdk15on-157.jar
We got while run this issue More than one file was found with OS independent path 'org/bouncycastle/x509/CertPathReviewerMessages_de.properties'
packagingOptions {
exclude 'org.bouncycastle.LICENSE'
exclude 'LICENSE'
exclude 'LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-
INF/services/com.fasterxml.jackson.core.JsonFactory'
exclude 'META-INF/rxjava.properties'
}
configurations {
compile.exclude module: 'org.bouncycastle'
compile.exclude group: 'com.google.code.gson'
}
This is my gradle file
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 27
defaultConfig {
applicationId "xxxxx"
minSdkVersion 19
targetSdkVersion 27
versionCode 2
versionName "1.1"
multiDexEnabled true
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
packagingOptions {
exclude 'org.bouncycastle.LICENSE'
exclude 'LICENSE'
exclude 'LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/services/com.fasterxml.jackson.core.JsonFactory'
exclude 'META-INF/rxjava.properties'
}
configurations {
compile.exclude module: 'org.bouncycastle'
compile.exclude group: 'com.google.code.gson'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
/* implementation "org.jetbrains.kotlin:kotlin-stdlib-
jdk7:$kotlin_version"*/
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.github.ganfra:material-spinner:2.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'xml-security:xmlsec:1.3.0'
implementation 'com.intuit.sdp:sdp-android:1.0.3'
implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'
implementation 'com.borax12.materialdaterangepicker:library:1.9'
implementation 'com.moos:Material-ProgressView:1.0.6'
implementation 'de.greenrobot:greendao:2.1.0'
implementation 'org.greenrobot:eventbus:3.0.0'
/* implementation 'org.jsoup:jsoup:1.8.3'*/
implementation 'com.github.ravindu1024:android-loadingdialog:1.0.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.2'
implementation 'com.github.ittianyu:BottomNavigationViewEx:1.2.4'
implementation 'com.jakewharton:butterknife:8.2.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.2.0'
implementation project(':framework-release')
implementation project(':aepscore')
implementation project(':aepslibrary-release')
implementation project(':fingpay')
}
This is my Error log
org.gradle.api.tasks.TaskExecutionException: Execution failed for
task ':app:transformResourcesWithMergeJavaResForDebug'.
at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.
executeActions(ExecuteActionsTaskExecuter.java:103)
at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.
execute(ExecuteActionsTaskExecuter.java:73)
at
org.gradle.api.internal.tasks.execution.
OutputDirectoryCreatingTaskExecuter
.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.
execute(SkipUpToDateTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.
ResolveTaskOutputCachingStateExecuter.execute
(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.
execute(ValidatingTaskExecuter.java:59)
at
org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter
.execute(SkipEmptySourceFilesTaskExecuter.java:101)
at org.gradle.api.internal.tasks.execution.FinalizeInputFileProperties
TaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
at
org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.
execute(CleanupStaleOutputsExecuter.java:91)
at org.gradle.api.internal.tasks.execution.
ResolveTaskArtifactStateTaskExecuter.execute
(ResolveTaskArtifactStateTaskExecuter.java:62)
at
org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter
.execute(SkipTaskWithNoActionsExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.
execute(SkipOnlyIfTaskExecuter.java:54)
at
org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.
execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.
execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$
EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:256)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$
RunnableBuildOperationWorker.execute
(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$
RunnableBuildOperationWorker.execute
(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.
execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.
run(DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$
EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:249)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$
EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:238)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$
TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$
TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$
TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$
TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.
execute(DefaultTaskExecutionPlan.java:663)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.
executeWithTask(DefaultTaskExecutionPlan.java:597)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$
TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecord
Failures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.
run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker
(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run
(ThreadPoolExecutor.java:617)
at org.gradle.internal.concurrent.ThreadFactoryImpl$Managed
ThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.android.builder.merge.DuplicateRelativeFileException: More
than one file was found with OS independent path
'org/bouncycastle/x509/CertPathReviewerMessages_de.properties'
at com.android.builder.merge.StreamMergeAlgorithms.
lambda$acceptOnlyOne$2(StreamMergeAlgorithms.java:75)
at com.android.builder.merge.StreamMergeAlgorithms.
lambda$select$3(StreamMergeAlgorithms.java:100)
at com.android.builder.merge.IncrementalFileMergerOutputs$1.
create(IncrementalFileMergerOutputs.java:86)
at com.android.builder.merge.DelegateIncrementalFileMergerOutput.
create(DelegateIncrementalFileMergerOutput.java:61)
at com.android.build.gradle.internal.transforms.
MergeJavaResourcesTransform$1.create(MergeJavaResourcesTransform.java:379)
at com.android.builder.merge.IncrementalFileMerger.
updateChangedFile(IncrementalFileMerger.java:221)
at com.android.builder.merge.IncrementalFileMerger.
mergeChangedInputs(IncrementalFileMerger.java:190)
at com.android.builder.merge.IncrementalFileMerger.
merge(IncrementalFileMerger.java:77)
at com.android.build.gradle.internal.transforms.
MergeJavaResourcesTransform.transform
(MergeJavaResourcesTransform.java:411)
at com.android.build.gradle.internal.pipeline.TransformTask$2.
call(TransformTask.java:239)
at com.android.build.gradle.internal.pipeline.TransformTask$2.
call(TransformTask.java:235)
at com.android.builder.profile.ThreadRecorder.record
(ThreadRecorder.java:102)
at com.android.build.gradle.internal.pipeline.TransformTask.
transform(TransformTask.java:230)
at sun.reflect.GeneratedMethodAccessor562.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.
IncrementalTaskAction.doExecute(IncrementalTaskAction.java:50)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.
execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.
execute(StandardTaskAction.java:26)
at org.gradle.api.internal.tasks.execution.ExecuteActions
TaskExecuter$1.run(ExecuteActionsTaskExecuter.java:124)
at org.gradle.internal.progress.DefaultBuildOperationExecutor
$RunnableBuildOperationWorker.execute
(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor
$RunnableBuildOperationWorker.execute
(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.
execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.
run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActions
TaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.
executeActions(ExecuteActionsTaskExecuter.java:95)
... 33 more
I need help with this issue. I am not sure what is wrong. This is the app level build gradle code. If I comment out other play services implementations it gives me other error.
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.rough.tuber.tuber"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.google.android.libraries.places:places:1.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-firestore:11.8.0'
// implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.firebase:firebase-client-android:2.4.0'
implementation 'com.google.android.gms:play-services:11.8.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:design:26.1.0'
implementation 'com.firebaseui:firebase-ui:0.6.0'
implementation ("com.github.bumptech.glide:glide:4.8.0") {
exclude group: "com.android.support"
}
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.google.android.gms:play-services-places:11.8.0'
}
apply plugin: 'com.google.gms.google-services'
Please if I remove another play services in implementation then it gives me another error. I am not sure what to do.
I am adding more error.
java.lang.RuntimeException: com.android.build.api.transform.TransformException: Error while generating the main dex list.
at com.android.builder.profile.Recorder$Block.handleException(Recorder.java:55)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:104)
at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:212)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:46)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.android.build.api.transform.TransformException: Error while generating the main dex list.
at com.android.build.gradle.internal.transforms.D8MainDexListTransform.transform(D8MainDexListTransform.kt:127)
at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:221)
at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:217)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
try adding the code below in your (app) build.gradle file
configurations {
exclude group: 'com.google.android.gms', module: 'play-services-base'
exclude group: 'com.google.android.gms', module: 'play-services-places'
exclude group: 'com.google.android.gms', module: 'play-services-location'
}
and add the following to your dependencies {}
implementation 'com.google.android.gms:play-services-base:11.8.0'
implementation 'com.google.android.gms:play-services-places:11.8.0'
instead of using seperate packages use the bundle.. it solve for me..
implementation 'com.google.android.gms:play-services:12.0.1'
The project builds and syncs successfully but when running the project on emulator(my phone), i get the error: Failed to execute aapt, and also Caused by:java.util.NoSuchElementException.
In gradle properties is android.enableAapt2 = false
org.gradle.api.tasks.TaskExecutionException: Execution failed for
task ':app:transformDexWithInstantRunDependenciesApkForDebug'. at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at
org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at
org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
at
org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at
org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
at
org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
at
org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
at
Here is the build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.sran.dzepniprofesor"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.android.support:design:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.google.android.gms:play-services-ads:12.0.1'
implementation 'com.android.support:design:26.1.0'
}
Go to preferences(settings) : click on Build,Execution,Deployment .....then select : Instant Run ......and uncheck its topmost checkbox (i.e Disable Instant Run)
I am facing error in android studio while Running app.
:app:mergeDebugJniLibFolders
:universalimageloader:compileDebugNdk NO-SOURCE
:universalimageloader:mergeDebugJniLibFolders
:universalimageloader:transformNativeLibsWithMergeJniLibsForDebug
:universalimageloader:transformNativeLibsWithStripDebugSymbolForDebug
:universalimageloader:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
:app:transformNativeLibsWithMergeJniLibsForDebug
:app:processDebugJavaRes NO-SOURCE
:app:transformResourcesWithMergeJavaResForDebug
:app:transformNativeLibsAndResourcesWithJavaResourcesVerifierForDebug
:app:transformClassesWithInstantRunForDebug
:app:transformClassesEnhancedWithInstantReloadDexForDebug
:app:incrementalDebugTasks
:app:preColdswapDebug
:app:fastDeployDebugExtractor
:app:generateDebugInstantRunAppInfo
:app:transformClassesWithInstantRunSlicerForDebug
:app:transformClassesWithDexBuilderForDebug
:app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
:app:buildInfoGeneratorDebug
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 22s
59 actionable tasks: 36 executed, 23 up-to-date
I am using project with ndk support. All are working fine till tomorrow.
what i have tried is :
Delete app level build directory,
Delete project level build directory,
Delete .gradle folder under project,
Android Studio -> Build -> Clean Project -> Make Project(5 times)
Android Studio -> File -> Invalidate Caches / Restart(2 times).
Is there any thing i was missing.
here is my --RunWith --Stacktrace
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:universalimageloader:mergeDebugShaders UP-TO-DATE
:universalimageloader:compileDebugShaders UP-TO-DATE
:universalimageloader:generateDebugAssets UP-TO-DATE
:universalimageloader:mergeDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:transformClassesWithDexBuilderForDebug
:app:transformClassesWithMultidexlistForDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> java.io.IOException: Can't write [E:\Run_AS_E\Final_Apps\Exito_final\Bedroom Photo Frames\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:\Users\Quickcode9\.gradle\caches\transforms-1\files-1.1\support-core-ui-27.1.0.aar\79d2738f98f02922870eae8feb3b0aba\jars\classes.jar(;;;;;;**.class)] (Duplicate zip entry [classes.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]))
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: java.lang.RuntimeException: java.io.IOException: Can't write [E:\Run_AS_E\Final_Apps\Exito_final\Bedroom Photo Frames\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:\Users\Quickcode9\.gradle\caches\transforms-1\files-1.1\support-core-ui-27.1.0.aar\79d2738f98f02922870eae8feb3b0aba\jars\classes.jar(;;;;;;**.class)] (Duplicate zip entry [classes.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]))
at com.android.builder.profile.Recorder$Block.handleException(Recorder.java:55)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:104)
at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:213)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
... 27 more
Caused by: java.io.IOException: Can't write [E:\Run_AS_E\Final_Apps\Exito_final\Bedroom Photo Frames\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:\Users\Quickcode9\.gradle\caches\transforms-1\files-1.1\support-core-ui-27.1.0.aar\79d2738f98f02922870eae8feb3b0aba\jars\classes.jar(;;;;;;**.class)] (Duplicate zip entry [classes.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]))
at proguard.OutputWriter.writeOutput(OutputWriter.java:187)
at proguard.OutputWriter.execute(OutputWriter.java:79)
at proguard.ProGuard.writeOutput(ProGuard.java:427)
at proguard.ProGuard.execute(ProGuard.java:175)
at com.android.build.gradle.internal.transforms.BaseProguardAction.runProguard(BaseProguardAction.java:61)
at com.android.build.gradle.internal.transforms.MainDexListTransform.shrinkWithProguard(MainDexListTransform.java:232)
at com.android.build.gradle.internal.transforms.MainDexListTransform.transform(MainDexListTransform.java:184)
at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:222)
at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:218)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
... 39 more
Caused by: java.io.IOException: Can't read [C:\Users\Quickcode9\.gradle\caches\transforms-1\files-1.1\support-core-ui-27.1.0.aar\79d2738f98f02922870eae8feb3b0aba\jars\classes.jar(;;;;;;**.class)] (Duplicate zip entry [classes.jar:android/support/design/widget/CoordinatorLayout$Behavior.class])
at proguard.InputReader.readInput(InputReader.java:188)
at proguard.InputReader.readInput(InputReader.java:158)
at proguard.OutputWriter.writeOutput(OutputWriter.java:176)
... 48 more
Caused by: java.io.IOException: Duplicate zip entry [classes.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]
at proguard.io.JarWriter.getOutputStream(JarWriter.java:138)
at proguard.io.FilteredDataEntryWriter.getOutputStream(FilteredDataEntryWriter.java:106)
at proguard.io.FilteredDataEntryWriter.getOutputStream(FilteredDataEntryWriter.java:106)
at proguard.io.FilteredDataEntryWriter.getOutputStream(FilteredDataEntryWriter.java:92)
at proguard.io.ClassRewriter.read(ClassRewriter.java:68)
at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87)
at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87)
at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87)
at proguard.io.JarReader.read(JarReader.java:65)
at proguard.io.DirectoryPump.readFiles(DirectoryPump.java:65)
at proguard.io.DirectoryPump.pumpDataEntries(DirectoryPump.java:53)
at proguard.InputReader.readInput(InputReader.java:184)
... 50 more
* Get more help at https://help.gradle.org
BUILD FAILED in 22s
here is my build.gradle file..
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.3'
defaultConfig {
applicationId "com.xxxxxxxxx.xxxxxxxxxxxxx.xxxx.xxx"
minSdkVersion 17
//noinspection OldTargetApi
targetSdkVersion 26
multiDexEnabled true
manifestPlaceholders = [onesignal_app_id : "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "REMOTE"]
}
buildTypes {
debug {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationVariants.all { variant ->
//noinspection GrDeprecatedAPIUsage
if (variant.getBuildType().isMinifyEnabled()) {
variant.outputs.all { output ->
def stringsFile = android.sourceSets.main.res.sourceFiles.find {
it.name.equals 'strings.xml'
}
output.outputFileName = "${new XmlParser().parse(stringsFile).string.find { it.#name.equals 'app_name' }.text()}.apk"
}
variant.assemble.doLast {
copy {
from variant.mappingFile
into "../doc_app_upload/mapping prog"
rename { String fileName ->
"mapping_${variant.versionName}.txt"
}
}
}
}
}
}
}
externalNativeBuild {
cmake {
path 'src/main/jni/CMakeLists.txt'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//basic-res
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
//noinspection GradleCompatible
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
//firebase analytics and ads
//noinspection GradleCompatible
implementation 'com.google.firebase:firebase-ads:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
//Startapp-ads
implementation 'com.startapp:inapp-sdk:3.6.9'
//App Update Notification
implementation 'com.github.javiersantos:AppUpdater:2.6.1'
// one signal
// implementation 'com.onesignal:OneSignal:3.+#aar'
implementation 'com.onesignal:OneSignal:3.8.1#aar'
implementation 'com.google.android.gms:play-services-gcm:11.8.0'
// retrofit, gson
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
//other dependencies
//noinspection GradleDependency
implementation 'org.adw.library:discrete-seekbar:1.0.1'
implementation 'com.android.support:multidex:1.0.2'
// Image Chooser , Image Loader, Image Cropper
implementation 'com.kbeanie:image-chooser-library:1.5.8#aar'
implementation 'com.github.bumptech.glide:glide:3.8.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'// 2.5.1
// Color Picker
implementation 'com.github.rtugeek:ColorSeekBar:1.5.2'
implementation 'com.rarepebble:colorpicker:2.2.0'
// filter effects
//noinspection GradleDependency
implementation 'org.wysaid:gpuimage-plus:2.4.6-min'
// compile 'org.wysaid:gpuimage-plus:2.4.6-min-armv7a' //Recommended
implementation 'com.ogaclejapan.smarttablayout:library:1.6.1#aar'
implementation 'com.ogaclejapan.smarttablayout:utils-v4:1.6.1#aar'
implementation 'com.github.zomato:androidphotofilters:1.0.1'
implementation 'com.intuit.sdp:sdp-android:1.0.4'
// retrofit gson
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation project(':universalimageloader')
}
apply plugin: 'com.google.gms.google-services'
Try disabling Instant run in AndroidStudio and then rebuilding everything.
Try to downgrade the version of google-services, if this doesn't help try this answer finally.
Problem:
Error after upgrading to Android Studio 3 : Error:java.io.IOException: Duplicate zip entry [43.jar:org/apache/http/annotation/NotThreadSafe.class]
Would appreciate some help in figuring out the issue. Seems related to apache library or something, not sure what it is about the annotation. This setup was working fine on Android 2.3, since I updated am getting this error and its been hours trying to fix the issue. I've enabled multidex support and all that but seems like this requires a more specific fix. Cheers
just updated to androidStudio3. Unfortunately when I run the build I get the following 4 errors:
Error:java.lang.RuntimeException: java.io.IOException: Can't write [C:\Users\MICHAEL\AndroidStudioProjects\Project\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:\Users\MICHAEL\AndroidStudioProjects\Project\app\build\intermediates\transforms\desugar\debug\43.jar(;;;;;;**.class)] (Duplicate zip entry [43.jar:org/apache/http/annotation/NotThreadSafe.class]))
Error:java.io.IOException: Can't write [C:\Users\MICHAEL\AndroidStudioProjects\Project\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:\Users\MICHAEL\AndroidStudioProjects\Project\app\build\intermediates\transforms\desugar\debug\43.jar(;;;;;;**.class)] (Duplicate zip entry [43.jar:org/apache/http/annotation/NotThreadSafe.class]))
Error:java.io.IOException: Can't read [C:\Users\MICHAEL\AndroidStudioProjects\Project\app\build\intermediates\transforms\desugar\debug\43.jar(;;;;;;**.class)] (Duplicate zip entry [43.jar:org/apache/http/annotation/NotThreadSafe.class])
Error:java.io.IOException: Duplicate zip entry [43.jar:org/apache/http/annotation/NotThreadSafe.class]
the exception in more detail:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: java.lang.RuntimeException: java.io.IOException: Can't write [C:\Users\MICHAEL\AndroidStudioProjects\Project\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:\Users\MICHAEL\AndroidStudioProjects\Project\app\build\intermediates\transforms\desugar\debug\43.jar(;;;;;;**.class)] (Duplicate zip entry [43.jar:org/apache/http/annotation/NotThreadSafe.class]))
at com.android.builder.profile.Recorder$Block.handleException(Recorder.java:55)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:104)
at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:213)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
... 27 more
Caused by: java.io.IOException: Can't write [C:\Users\MICHAEL\AndroidStudioProjects\Project\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:\Users\MICHAEL\AndroidStudioProjects\Project\app\build\intermediates\transforms\desugar\debug\43.jar(;;;;;;**.class)] (Duplicate zip entry [43.jar:org/apache/http/annotation/NotThreadSafe.class]))
at proguard.OutputWriter.writeOutput(OutputWriter.java:187)
at proguard.OutputWriter.execute(OutputWriter.java:79)
at proguard.ProGuard.writeOutput(ProGuard.java:427)
at proguard.ProGuard.execute(ProGuard.java:175)
at com.android.build.gradle.internal.transforms.BaseProguardAction.runProguard(BaseProguardAction.java:61)
at com.android.build.gradle.internal.transforms.MainDexListTransform.shrinkWithProguard(MainDexListTransform.java:232)
at com.android.build.gradle.internal.transforms.MainDexListTransform.transform(MainDexListTransform.java:184)
at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:222)
at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:218)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
... 39 more
Caused by: java.io.IOException: Can't read [C:\Users\MICHAEL\AndroidStudioProjects\Project\app\build\intermediates\transforms\desugar\debug\43.jar(;;;;;;**.class)] (Duplicate zip entry [43.jar:org/apache/http/annotation/NotThreadSafe.class])
at proguard.InputReader.readInput(InputReader.java:188)
at proguard.InputReader.readInput(InputReader.java:158)
at proguard.OutputWriter.writeOutput(OutputWriter.java:176)
... 48 more
Caused by: java.io.IOException: Duplicate zip entry [43.jar:org/apache/http/annotation/NotThreadSafe.class]
at proguard.io.JarWriter.getOutputStream(JarWriter.java:138)
at proguard.io.FilteredDataEntryWriter.getOutputStream(FilteredDataEntryWriter.java:106)
at proguard.io.FilteredDataEntryWriter.getOutputStream(FilteredDataEntryWriter.java:106)
at proguard.io.FilteredDataEntryWriter.getOutputStream(FilteredDataEntryWriter.java:92)
at proguard.io.ClassRewriter.read(ClassRewriter.java:68)
at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87)
at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87)
at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87)
at proguard.io.JarReader.read(JarReader.java:65)
at proguard.io.DirectoryPump.readFiles(DirectoryPump.java:65)
at proguard.io.DirectoryPump.pumpDataEntries(DirectoryPump.java:53)
at proguard.InputReader.readInput(InputReader.java:184)
... 50 more
here's my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.example.michael.project"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
jackOptions {
enabled true
}
// Enabling multidex support.
multiDexEnabled true
}
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
lintOptions {
checkReleaseBuilds false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
}
dexOptions {
javaMaxHeapSize "4g"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:multidex:1.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.google.api-client:google-api-client-android:1.22.0'
compile 'com.google.apis:google-api-services-vision:v1-rev357-1.22.0'
compile 'com.google.code.findbugs:jsr305:2.0.1'
compile 'commons-io:commons-io:2.5'
compile('org.apache.httpcomponents:httpmime:4.3.6') {
exclude module: 'httpclient'
}
compile 'com.android.support:appcompat-v7:26+'
compile 'com.android.support:design:26+'
compile 'com.android.support:recyclerview-v7:26+'
compile 'com.android.support:cardview-v7:26+'
compile 'com.synnapps:carouselview:0.1.4'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile files('C:/Users/MICHAEL/AndroidStudioProjects/Project/lib/fluent-hc-4.5.3.jar')
compile files('C:/Users/MICHAEL/AndroidStudioProjects/Project/lib/jna-4.1.0.jar')
compile files('C:/Users/MICHAEL/AndroidStudioProjects/Project/lib/jna-platform-4.1.0.jar')
compile files('C:/Users/MICHAEL/AndroidStudioProjects/Project/lib/jsoup-1.10.3.jar')
compile files('C:/Users/MICHAEL/AndroidStudioProjects/Project/lib/commons-cli-1.2.jar')
compile files('C:/Users/MICHAEL/AndroidStudioProjects/Project/lib/org-apache-commons-codec.jar')
compile files('C:/Users/MICHAEL/AndroidStudioProjects/Project/lib/jaunt1.3.5.1.jar')
compile files('C:/Users/MICHAEL/AndroidStudioProjects/Project/lib/commons-lang3-3.6.jar')
compile files('C:/Users/MICHAEL/AndroidStudioProjects/Project/lib/unirest-java-1.4.9.jar')
compile files('C:/Users/MICHAEL/AndroidStudioProjects/Project/lib/urlimageviewhelper-1.0.4.jar')
}
Fixed the problem by removing
jackOptions {
enabled true
}
and adding
android.compileOptions.sourceCompatibility 1.8
android.compileOptions.targetCompatibility 1.8
Also, removed all the apache locally imported jars and replaced with these instead:
compile 'commons-codec:commons-codec:1.10'
compile 'org.apache.commons:commons-lang3:3.6'
compile 'commons-io:commons-io:2.6'
compile('org.apache.httpcomponents:httpmime:4.3.6') {
exclude module: 'httpclient'
}
Cleaned and rebuilt the project and now thankfully works as expected.