2013-01-17 54 views
1

可能重複:
「Conversion to Dalvik format failed with error 1」 on external JAR轉換爲Dalvik的格式,在Android的錯誤1失敗

我得到這個錯誤:轉換爲Dalvik的格式錯誤1 它開始失敗加載facebook SDK後給了我這個錯誤。問題是什麼?

我在互聯網上搜索了很多,但我無法解決我的問題。我能做什麼? 這裏是我的控制檯:

[2013-01-17 15:03:14 - Mert] Dx 
UNEXPECTED TOP-LEVEL EXCEPTION: 
java.lang.IllegalArgumentException: already added: Landroid/support/v4/widget/CursorAdapter$1; 
    at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123) 
    at com.android.dx.dex.file.DexFile.add(DexFile.java:163) 
    at com.android.dx.command.dexer.Main.processClass(Main.java:490) 
    at com.android.dx.command.dexer.Main.processFileBytes(Main.java:459) 
    at com.android.dx.command.dexer.Main.access$400(Main.java:67) 
    at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:398) 
    at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245) 
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131) 
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109) 
    at com.android.dx.command.dexer.Main.processOne(Main.java:422) 
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:333) 
    at com.android.dx.command.dexer.Main.run(Main.java:209) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
    at java.lang.reflect.Method.invoke(Unknown Source) 
    at com.android.ide.eclipse.adt.internal.build.DexWrapper.run(DexWrapper.java:180) 
    at com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:703) 
    at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:577) 
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728) 
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) 
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199) 
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:321) 
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:396) 
    at org.eclipse.core.internal.resources.Project$1.run(Project.java:618) 
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344) 
    at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:597) 
    at org.eclipse.core.internal.resources.Project.build(Project.java:124) 
    at com.android.ide.eclipse.adt.internal.project.ProjectHelper.doFullIncrementalDebugBuild(ProjectHelper.java:1000) 
    at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(LaunchConfigDelegate.java:147) 
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855) 
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704) 
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1047) 
    at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1251) 
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) 
[2013-01-17 15:03:14 - Mert] Dx 1 error; aborting 
[2013-01-17 15:03:14 - Mert] Conversion to Dalvik format failed with error 1 

這裏是我的構建路徑:

a busy cat http://img820.imageshack.us/img820/1372/androiddalvikerror.jpg

感謝您的幫助。

問候。

+0

http://stackoverflow.com/a/3389640/646806 – RobinHood

+0

您是否使用IntelliJ或Eclipse來編譯您的項目? –

回答

2

剛剛從項目中刪除所有被引用的庫文件和清理項目......這將消除錯誤..

OR

嘗試從您的Java構建刪除所有jar文件路徑,然後再次連接從lib文件夾..

+0

究竟哪一個我必須刪除?如果我刪除其中一個可能會出現項目中的任何問題? – mertaydin

+0

universal image loader.jar –

+0

好嗎? 我刪除通用圖像加載器,並試圖運行,再次沒有工作 我加了facebookSDK,我有一個Session.java文件和facebook SDK也有Session.java文件。這是導致問題的原因嗎? – mertaydin

相關問題