Weibo sdk Multiple dex files define Lcom/sina/weibo/sdk/BuildConfig, weibolcom

Source: Internet
Author: User

Weibo sdk Multiple dex files define Lcom/sina/weibo/sdk/BuildConfig, weibolcom

When integrating Sina Weibo SDK and compiling with gradle, the following error is reported:

UNEXPECTED TOP-LEVEL EXCEPTION:com.android.dex.DexException: Multiple dex files define Lcom/sina/weibo/sdk/BuildConfig;at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594)at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552)at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533)at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170)at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)at com.android.dx.command.dexer.Main.run(Main.java:230)at com.android.dx.command.dexer.Main.main(Main.java:199)at com.android.dx.command.Main.main(Main.java:103)

The reason is that BuildConfig. class in weibosdkcore. jar should not have existed in jar. I don't know how to develop Weibo.
The solution is simple: unpack weibosdkcore. jar, delete BuildConfig. class in it, and then package the jar again.

  

The details are as follows:
1. decompress the jar package:
Jar xf weibosdkcore. jar
2. Delete the com/sina/weibo/sdk/BuildConfig. class in the decompressed directory.
3. Repackage:
Jar cvf weibosdkcore. jar *

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.