简体   繁体   English

在项目libs文件夹中添加quickblox-android-0.8.1.jar文件并在设备上安装时出现错误后

[英]After Adding quickblox-android-0.8.1.jar file in project libs folder and getting error when install on device

when add quickblox-android-0.8.1.jar in My Project libs folder then I'm getting an error. 当在我的项目libs文件夹中添加quickblox-android-0.8.1.jar ,出现错误。 I have done all related for it like update Adt to 21 , bin delete and clean, restart Eclipse etc but not working. 我已经完成了所有与之相关的工作,例如将Adt更新为21 ,删除并清理bin,重新启动Eclipse等,但是没有用。 Also in my project 13 jar files contains. 同样在我的项目中包含13个jar文件。 here Only quickblox-android-0.8.1.jar is getting issue.dependency issue and Multiple dex files issue.pls help me. 在这里,只有quickblox-android-0.8.1.jar遇到了issue.dependency问题,而多个dex文件issue.pls帮助了我。 facing issue from last 4 days 最近4天面临的问题

below jar files using in Project libs folder contains 在Project libs文件夹中使用的jar文件下面包含

    apache-mime4j-0.6.jar
    asmack-android-7
    gcm.jar
    httpmime-4.1.2.jar
    jtwitter.jat
    PayPal_MPL.jar
    quickblox-android-0.8.1.jar
    signpost-commonshttp4-1.2.1.1.jar
    signpost-core-1.2.1.1.jar
    signpost-jetty6-1.2.1.1.jar
    twitter4j-core-android-2.2.6.jar
    universal-image-loader-1.6.1-with-src.jar
    android-support-v4.jar

error log 错误日志

[2013-05-10 17:59:02 - Dex Loader] Unable to execute dex: Multiple dex files define Lorg/apache/http/entity/mime/FormBodyPart;
[2013-05-10 17:59:02 - Lockme] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lorg/apache/http/entity/mime/FormBodyPart;
[2013-05-10 17:59:20 - Dex Loader] Unable to execute dex: Multiple dex files define Lorg/apache/http/entity/mime/FormBodyPart;
[2013-05-10 17:59:20 - Lockme] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lorg/apache/http/entity/mime/FormBodyPart;

In simple when i'm adding this jar file then project not working and when Remove this jar file from Project then load (run) project well and able to install on device and Emulator, this may simple issue but coudnot resolve it. 简单来说,当我添加此jar文件,然后项目无法正常工作,而当从Project中删除此jar文件,然后很好地加载(运行)项目并能够在设备和仿真器上安装时,这可能是简单的问题,但无法解决。

Project.properties

# Project target.
target=Google Inc.:Google APIs:17
android.library.reference.3=../ImageViewTouch
android.library.reference.4=../android-pulltorefresh-master/pulltorefresh
android.library.reference.1=../android-mapviewballoons
android.library.reference.2=../../Android/android-sdk-windows/android-sdk-windows/android-sdk-windows/android-sdk-windows/extras/google/google_play_services/libproject/google-play-services_lib

java Build Java构建 在此处输入图片说明

Java Order - and Export Java订单-导出 在此处输入图片说明

Error Image 错误图片 在此处输入图片说明

Here is a list of libs which uses Android QB SDK http://quickblox.com/developers/Android#How_to:_add_SDK_to_IDE_and_connect_to_the_cloud 这是使用Android QB SDK的库列表http://quickblox.com/developers/Android#How_to:_add_SDK_to_IDE_and_connect_to_the_cloud

You can remove your lib and it will be used from QB SDK 您可以删除您的库,它将在QB SDK中使用

no need in libs except Quick blox see 除Quick blox外,无需在库中查看

make sure you're NOT adding it in BOTH places (libs folder AND project properties=>java build path). 确保您没有在两个地方都添加它(libs文件夹和项目属性=> java构建路径)。 It should be in one or the other, otherwise you will get DEX errors. 它应该在一个或另一个中,否则会出现DEX错误。 I just spent two days chasing down the exact same (looking) problem with the google maps.jar. 我只花了两天时间来追查与google maps.jar完全相同(看起来)的问题。 In the end all it was was this double reference that turned out to be the culprit. 最后,最终导致罪魁祸首的是双重参考。 Not sure that's the problem you're facing, but it's a good place to start :) 不确定这是您面临的问题,但这是一个不错的起点:)

Simple answer for Multiple dex files define Lorg/apache/http/entity/mime/FormBodyPart; Multiple dex files define Lorg/apache/http/entity/mime/FormBodyPart;简单答案Multiple dex files define Lorg/apache/http/entity/mime/FormBodyPart;

i advice you to this problem occur in two type lib references in project.one is use in the JavaBuildpath ---> Libraies 我建议您这个问题出现在project中的两种类型的lib引用中。一种是在JavaBuildpath ---> Libraies中使用

and another is in JavaBuildpath ----> Order and Export--> Android dependencis. 另一个是在JavaBuildpath ----> Order and Export-> AndroidDependencis中。

so i advice first remove the dependencies and after clean and run.problem slove. 所以我建议先删除依赖项,然后清理并运行。问题slove。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM