Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/182.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将google api java客户端库与android一起使用时,转换为Dalvik格式失败,错误为1_Android_Json_Google Places Api_Java_Google Client - Fatal编程技术网

将google api java客户端库与android一起使用时,转换为Dalvik格式失败,错误为1

将google api java客户端库与android一起使用时,转换为Dalvik格式失败,错误为1,android,json,google-places-api,java,google-client,Android,Json,Google Places Api,Java,Google Client,我下面是一篇关于GoogleAPI java客户端库的文章。我已经下载了JAR,并将它们添加到我项目中的libs文件夹中。在编译期间,没有错误,但当我运行项目时,会收到以下错误消息: Dx trouble processing "javax/transaction/HeuristicCommitException.class": Ill-advised or mistaken usage of a core class (java.* or javax.*) when not building

我下面是一篇关于GoogleAPI java客户端库的文章。我已经下载了JAR,并将它们添加到我项目中的libs文件夹中。在编译期间,没有错误,但当我运行项目时,会收到以下错误消息:

Dx trouble processing "javax/transaction/HeuristicCommitException.class":
Ill-advised or mistaken usage of a core class (java.* or javax.*)
when not building a core library.

This is often due to inadvertently including a core library file
in your application's project, when using an IDE (such as
Eclipse). If you are sure you're not intentionally defining a
core class, then this is the most likely explanation of what's
going on.

However, you might actually be trying to define a class in a core
namespace, the source of which you may have taken, for example,
from a non-Android virtual machine project. This will most
assuredly not work. At a minimum, it jeopardizes the
compatibility of your app with future versions of the platform.
It is also often of questionable legality.

If you really intend to build a core library -- which is only
appropriate as part of creating a full virtual machine
distribution, as opposed to compiling an application -- then use
the "--core-library" option to suppress this error message.

If you go ahead and use "--core-library" but are in fact
building an application, then be forewarned that your application
will still fail to build or run, at some point. Please be
prepared for angry customers who find, for example, that your
application ceases to function once they upgrade their operating
system. You will be to blame for this problem.

If you are legitimately using some code that happens to be in a
core package, then the easiest safe alternative you have is to
repackage that code. That is, move the classes in question into
your own package namespace. This means that they will never be in
conflict with core system classes. JarJar is a tool that may help
you in this endeavor. If you find that you cannot do this, then
that is an indication that the path you are on will ultimately
lead to pain, suffering, grief, and lamentation.

[2012-07-24 12:12:12 - CurrentLocationMapDemo] Dx 1 error; aborting
[2012-07-24 12:12:12 - CurrentLocationMapDemo] Conversion to Dalvik format failed with error 1
我尝试了其他的链接,但是没有成功

我尝试过的事情:

  • 正在从我的工作区中删除项目
  • 在清理模式下重新启动eclipse
  • 再次导入项目
  • 确保构建路径中只存在android X.X和android依赖项

  • 导致此错误的原因有很多:

    • 双重依赖
    • 前进问题
    • 。。。 在这里查看许多不同的“解决方案”:

    但您可以尝试查看android示例:


    hth

    此错误可能有许多原因:

    • 双重依赖
    • 前进问题
    • 。。。 在这里查看许多不同的“解决方案”:

    但您可以尝试查看android示例:


    hth

    在尝试了很多东西之后,我得到了它。最初,我所做的是,我添加了所有的jar文件(那些我不需要的文件)。此外,我还没有添加
    libs sources
    文件夹。在删除不需要的jar文件并添加
    libs sources
    文件夹时,它起了作用。希望能有帮助。

    在尝试了很多东西后,我得到了它。最初,我所做的是,我添加了所有的jar文件(那些我不需要的文件)。此外,我还没有添加
    libs sources
    文件夹。在删除不需要的jar文件并添加
    libs sources
    文件夹时,它起了作用。希望对您有所帮助。

    HeuristicCommitException
    位于
    transaction-api-1.1.jar

    QName
    xpp3-1.1.4c.jar中


    移除这两个jar,事情就会过去。

    HeuristicCommitteException
    位于
    transaction-api-1.1.jar

    QName
    xpp3-1.1.4c.jar中


    移除这两个罐子,事情就会发生。

    你想在哪个目标上运行这个(AVD/real device,OS版本)?Galaxy nexus(real device,android 4.0.4)你想在哪个目标上运行这个(AVD/real device,OS版本)?Galaxy nexus(real device,android 4.0.4)我已经尝试了上述链接。双重依赖并不存在,因为我已经尝试了我问题中的第4点。proguard未启用。我也尝试了github示例,但它还有其他问题。我尝试了上面提到的链接。双重依赖并不存在,因为我已经尝试了我问题中的第4点。proguard未启用。我还尝试了github示例,但它还有其他问题。