Questions about exporting Jar packages from Android studio

Source: Internet
Author: User

The reason for this is that the first thing to think about unity development

Say something about my environment.

Win7 x64

VS2015

Unity5.2.2

Android Studio 2.3.2

JDK1.8


I now combine unity with Android is to export the Android Project AAR package, the specific method Baidu has, do not repeat


Now, let's talk about the problem of exporting the jar package

Read the online said in Gradle Riga task then you can Exportjar, and then this jar package and androidmanifest.xml together to test

Unity's assets/plugins/android, as if it had been previously exported to AAR, then the build works OK.

But the actual error will be as follows:


650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/97/EF/wKioL1k1IFqyMofZAAA1hnQKZsU672.png-wh_500x0-wm_ 3-wmp_4-s_3537700413.png "title=" E1.png "alt=" Wkiol1k1ifqymofzaaa1hnqkzsu672.png-wh_50 "/>


650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/97/EF/wKioL1k1IH2wR7G5AABCsH7GJ2M725.png-wh_500x0-wm_ 3-wmp_4-s_399423967.png "title=" E2.png "alt=" Wkiol1k1ih2wr7g5aabcsh7gj2m725.png-wh_50 "/>


Which means it's not as optimistic as it says online.


Workaround is

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/97/EE/wKiom1k1IOey23EfAAAVSUMOMyU101.png-wh_500x0-wm_ 3-wmp_4-s_642382379.png "title=" S1.png "alt=" Wkiom1k1ioey23efaaavsumomyu101.png-wh_50 "/>

Find the Debug folder under bundles first

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/97/EE/wKiom1k1ISWzpKgrAAA2f5c80o0508.png-wh_500x0-wm_ 3-wmp_4-s_494445990.png "title=" S2.png "alt=" Wkiom1k1iswzpkgraaa2f5c80o0508.png-wh_50 "/>


Res,androidmanifest.xml,r.txt the three things that the red line marked.

and the assets/plugins/android of unity.

And then build is OK.


The study found that in fact, this is a lot of things in the AAR before using all of the content into the AAR package

So what is the jar package that was exported in a special way (Gradle task)?

TM is in the Classes.jar, just changed a name changed a path, cheat ghosts

Also what task what, get the marvellous, do not have to deliberately go to export jar package No, directly there is hey


So summarize:

    1. With Aar+androidmanifest.xml, you don't need to export the jar package.

    2. Do not need to use the jar package, and do not have to export, because there is a direct



This article is from the "under the Tree Beast" blog, please make sure to keep this source http://shuxiayeshou.blog.51cto.com/4452347/1932459

Questions about exporting Jar packages from Android studio

Related Article

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.