Android Studio export. AAR Package Operation Flow

Source: Internet
Author: User

In fact, it's very simple, first you have to build a project (nonsense)


Locate the Build.gradle file (not the entire project), see

    1. Under Project view

      650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/97/FE/wKioL1k2HfvTazn8AABWtgJX5Pw436.png "title=" A1.png "alt=" Wkiol1k2hfvtazn8aabwtgjx5pw436.png "/>

    2. or under Android view

      650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/97/FE/wKioL1k2HjuTarpQAAA2-tvtgl8581.png "title=" A2.png "alt=" Wkiol1k2hjutarpqaaa2-tvtgl8581.png "/>


Open it and make some changes


Apply plugin: ' Com.android.application '

Android {

Compilesdkversion 25

Buildtoolsversion "25.0.3"

Defaultconfig {

ApplicationID "Com.reach.test"

Minsdkversion 14

Targetsdkversion 25

Versioncode 1

Versionname "1.0"

Testinstrumentationrunner "Android.support.test.runner.AndroidJUnitRunner"

}


I only intercepted the first few lines, because the change is here, notice the two lines of yellow word

Apply plugin: ' Com.android.application '

This line changes the application into a library, as follows

Apply plugin: ' Com.android.library '

Then a second Huang

ApplicationID "Com.reach.test"

Just delete this line directly from the code.


Okay, the file changes are over.


Then Project release APK

Menu Build->build APK

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/97/FE/wKioL1k2IEDixVYoAAESmN-X5hM825.jpg "title=" A3.jpg "alt=" Wkiol1k2iedixvyoaaesmn-x5hm825.jpg "/>


A prompt will appear in the lower right corner after success

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/97/FD/wKiom1k2IIqyHJW4AAAU6V2Qz4E790.png "title=" A5.png "alt=" Wkiom1k2iiqyhjw4aaau6v2qz4e790.png "/>

Click the Blue word "Show in Explorer" to open the folder where the published files are located

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/97/FD/wKiom1k2IOOTREo3AADG5Lskkks191.png "title=" A6.png "alt=" Wkiom1k2iootreo3aadg5lskkks191.png "/>


Go to Outputs folder

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/97/FD/wKiom1k2ISrAw9a2AABLei7mqB0071.png "title=" A7.png "alt=" Wkiom1k2israw9a2aablei7mqb0071.png "/>


The AAR file that we want is under the AAR folder

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/97/FD/wKiom1k2IWGyzAixAABQpb8RwFw476.png "title=" A8.png "alt=" Wkiom1k2iwgyzaixaabqpb8rwfw476.png "/>


The. Aar file is published now

For me, it's the Android development for unity.


It's so simple, it's not surprising, it's not exciting.

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

Android Studio export. AAR Package Operation Flow

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.