Unity3d operators pay for Android packaging traps Libunicomsdk.jar

Source: Internet
Author: User

Original address:/HTTP blog.csdn.net/alking_sun/article/details/36624491

It's been almost 2 years since I Unity3d SDK integration, and I've met a lot of tricky SDKs, which are based on the operator's SDK.

In one of my other articles, I mentioned the workaround for moving mm to not find the file Mmiap.xml after using unity packaging.

The most obvious occurrence of this behavior is:

1. Use the IDE to run the official demo, or to do the test program yourself, it is normal to run

2. But after using Unity3d packaging, you will find that it is not working properly. In Logcat, you will find that the XXXX file is generally not found.

For example:

When integrating the Unicom SDK, an error will be raised: Java.io.filenotfoundexception:armeabi/libunicomsdk.jar

 

Similar to this phenomenon I have seen a lot, and then I found the reason:

The jar package that is given by the

operator includes not only the. class file, but also the assets resource file in the package.

For the certificate:

1. Move mm Mmsmsbilling1.2.3.jar Package contents.

2. Unicom SDK package content.

The workaround is also simple:

1. Extract the jar package using the decompression software

2. Copy the files that were extracted under folder/assets/to the project's assets folder.

3. Use the JAR-CVF command to package the remaining COM CN folders containing. class files into a new jar package

4. Place the new jar package under the project's Libs file.

5. Use Unity to pack it up OK

 

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.