F
F
falstaf2011-10-19 19:51:49
Android
falstaf, 2011-10-19 19:51:49

Android, problems after SDK update?

After yesterday's update of the Android SDK, all previously successfully compiled projects now began to fall out with a compilation error:

UNEXPECTED TOP-LEVEL EXCEPTION:<br/>
java.lang.IllegalArgumentException: already added: Lcom/commonsware/cwac/tlv/TouchListView$1;<br/>
Dx at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)<br/>
Dx at com.android.dx.dex.file.DexFile.add(DexFile.java:163)<br/>
Dx at com.android.dx.command.dexer.Main.processClass(Main.java:486)<br/>
Dx at com.android.dx.command.dexer.Main.processFileBytes(Main.java:455)<br/>
Dx at com.android.dx.command.dexer.Main.access$400(Main.java:67)<br/>
Dx at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:394)<br/>
Dx at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)<br/>
Dx at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)<br/>
Dx at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)<br/>
Dx at com.android.dx.command.dexer.Main.processOne(Main.java:418)<br/>
Dx at com.android.dx.command.dexer.Main.processAllFiles(Main.java:329)<br/>
Dx at com.android.dx.command.dexer.Main.run(Main.java:206)<br/>
Dx at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br/>
Dx at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)<br/>
Dx at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br/>
Dx at java.lang.reflect.Method.invoke(Method.java:616)<br/>
Dx at com.android.ide.eclipse.adt.internal.build.DexWrapper.run(DexWrapper.java:179)<br/>
Dx at com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:729)<br/>
Dx at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:602)<br/>
Dx at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)<br/>
Dx at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)<br/>
Dx at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)<br/>
Dx at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:321)<br/>
Dx at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:396)<br/>
Dx at org.eclipse.core.internal.resources.Project$1.run(Project.java:618)<br/>
Dx at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)<br/>
Dx at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:597)<br/>
Dx at org.eclipse.core.internal.resources.Project.build(Project.java:124)<br/>
Dx at com.android.ide.eclipse.adt.internal.project.ProjectHelper.build(ProjectHelper.java:869)<br/>
Dx at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(LaunchConfigDelegate.java:146)<br/>
Dx at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854)<br/>
Dx at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)<br/>
Dx at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:928)<br/>
Dx at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1132)<br/>
Dx at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)<br/>
Dx 2 errors; aborting<br/>
Conversion to Dalvik format failed with error 1

And now the compilation of any existing project ends with such an error ("Conversion to Dalvik format failed with error 1").
Google search gave a bunch of links with the above problem, but the solution was never found.
If anyone has already encountered this problem and still found a working solution, I would be very grateful to know it.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
ara89, 2011-10-22
@ara89

Today I saw a link on Twitter with a description of the solution to your problem

P
palmut, 2011-10-19
@palmut

On Windows 7 x64, the method described on StackOverflow helps : changing the file file [Android SDK Installation Directory]\tools\proguard\bin\proguard.bat line: to
call %java_exe% -jar "%PROGUARD_HOME%"\lib\proguard.jar %*

call %java_exe% -jar "%PROGUARD_HOME%"\lib\proguard.jar %1 %2 %3 %4 %5 %6 %7 %8 %9

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question