简体   繁体   中英

How to set the library build order in gradle?

I have a custom android.jar which overrides the default android classes and needs to be build before the default android.jar .In eclipse I can set the order in the tab of 'Order and Export'。But now I'm using gradle in android studio,what should i do?

Any ideas? Any clarification needed? Thanks in advance!

在此输入图像描述

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.android.support:design:23.0.0'
}

Like this you can build jar files

If you right click on your project and click "Open Module Settings" you should see a tab that says "Dependencies". After you click on the tab you should see a green plus button, clicking on it will give you 3 options. Select "Module Dependency" and from there you can add your jar. It should automatically update the gradle for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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