• Register
0 votes
40 views

Problem :

I am new to Android Programming. I have started working on it recently. Now I am facing below error message.

Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.transform.api.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 1

I think above error is caused because I have added too many Gradle dependencies, but all those dependencies are important for my project.

Have anybody faced this issue?

8 4 2
2,300 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I have faced this problem. I can help you in fixing your problem.

Your Android application files always have the executable bytecode files which are in the form of the Dalvik Executable or DEX files, these files have the compiled code which is used to run your app. Now Dalvik Executable specification is limiting a total number of methods those can be referenced within your single DEX file to 65,536 including your Android framework methods and library methods and also the methods in your own code. To avoid this limit it requires you to configure your app build process such as to be able to  generate more than one your DEX file it is known as a multidex configuration.

So you must format your code with the help of libraries to remove the excess classes and also not to exceed the limit methods. Then you need to Sync Gradle in AndroidStudio and just check if it runs

5 2 1
4,980 points

Related questions

0 votes
1 answer 11 views
11 views
Problem: execution failed for task ':app:compiledebugjavawithjavac'
asked Feb 18 charles mathews 3.9k points
0 votes
1 answer 528 views
528 views
Problem : I am facing the gradle error at the building from few days it just came randomly. My project depends on the multiple libraries and it built without the problems until few days (even with a libraries) ... .gradle.api.internal.changedetection.state.CacheLockReleasingTaskExecuter$1.run(CacheLockReleasingTaskExecuter.java:40) at org.gradle.internal.Factories$1.create(Factories.java:26)
asked Jan 30, 2020 jwilliam 3.9k points
0 votes
2 answers 1K views
1K views
Problem : Currently I am using the Android Studio 2.1 but when I try to run it the suddenly my App shows me the below error Message my Gradle Build saying the following Exception is: org.gradle. ... .execute(SkipEmptySourceFilesTaskExec uter.java:52) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.j ava:52)
asked Jan 31, 2020 jwilliam 3.9k points
1 vote
1 answer 379 views
379 views
Problem : I am very beginner to Android and Firebase. I am taking help of tutorials to learn Android Programming. I am trying to add the Firebase-database to my Android application and I am facing below error: FAILURE: Build failed with an exception. ·         What went ... to get full insights. I am stuck with above Android error. Need some expert who can help me in fixing above Android error.
asked May 16, 2020 Martin K 6.6k points
0 votes
1 answer 9 views
9 views
Problem: error: program type already present: android.support.v4.app.fragmenttransitioncompat21$1
asked Feb 20 Lucky Guy 1.4k points
0 votes
2 answers 248 views
248 views
Problem : My android studio was getting build error while build execution as following: Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex"
asked Dec 4, 2019 alecxe 7.5k points
0 votes
1 answer 4 views
4 views
Problem : You have not accepted the license agreements of the following sdk components.
asked 5 days ago Shovo210 3.9k points
0 votes
1 answer 5 views
5 views
Problem: warning:unable to find optional library: org.apache.http.legacy
asked Feb 21 charles mathews 3.9k points
0 votes
1 answer 3 views
3 views
Problem: website is offline no cached version of this page is available.
asked Feb 21 charles mathews 3.9k points
0 votes
1 answer 19 views
19 views
Problem: re-download dependencies and sync project (requires network)
asked Feb 16 Ethan ross 1.9k points