zoukankan      html  css  js  c++  java
  • 实现一个可以发送表单内容转换成pdf并发送功能的android 程序

    遇到一个小问题:

    当加入javamail 的三个jar包后遇到报错

    java.lang.IllegalArgumentException: already added: Lorg/apache/harmony/awt/internal/nls/Messages;
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at com.android.dx.dex.file.DexFile.add(DexFile.java:163)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at com.android.dx.command.dexer.Main.processClass(Main.java:486)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at com.android.dx.command.dexer.Main.processFileBytes(Main.java:455)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at com.android.dx.command.dexer.Main.access$400(Main.java:67)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:394)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at com.android.dx.command.dexer.Main.processOne(Main.java:418)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at com.android.dx.command.dexer.Main.processAllFiles(Main.java:329)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at com.android.dx.command.dexer.Main.run(Main.java:206)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at java.lang.reflect.Method.invoke(Unknown Source)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at com.android.ide.eclipse.adt.internal.build.DexWrapper.run(DexWrapper.java:179)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:745)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:634)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:282)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:363)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at org.eclipse.core.internal.resources.Project$1.run(Project.java:545)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:524)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at org.eclipse.core.internal.resources.Project.build(Project.java:123)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at com.android.ide.eclipse.adt.internal.project.ProjectHelper.doFullIncrementalDebugBuild(ProjectHelper.java:961)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(LaunchConfigDelegate.java:146)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:924)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1128)
    [2012-08-01 19:08:21 - scoresheetdemo] Dx  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    [2012-08-01 19:08:23 - scoresheetdemo] Dx 1 error; aborting
    [2012-08-01 19:08:23 - scoresheetdemo] Conversion to Dalvik format failed with error 1

    找了很多方法比如重新导入jar包之类,但是都没用。最后回到错误本身,发现当我只用其中任意一个external包的时候都不会出错,是两个包有相同的类,打开看都是一样的,于是我删掉其中一个就好了。

  • 相关阅读:
    jQuery火箭图标返回顶部代码
    jQuery火箭图标返回顶部代码
    jQuery火箭图标返回顶部代码
    jQuery火箭图标返回顶部代码
    jQuery火箭图标返回顶部代码
    正则表达式
    python链接oracle数据库以及数据库的增删改查实例
    无法删除用户的解决办法
    【爬虫】大杀器——phantomJS+selenium
    【爬虫】把抓到数据存起来——爬虫绝配mongodb
  • 原文地址:https://www.cnblogs.com/lauraxia/p/2619584.html
Copyright © 2011-2022 走看看