How to manually include external aar package using new Gradle Android Build System

后端 未结 23 1841
故里飘歌
故里飘歌 2020-11-22 03:58

I\'ve been experimenting with the new android build system and I\'ve run into a small issue. I\'ve compiled my own aar package of ActionBarSherlock which I\'ve called \'act

23条回答
  •  被撕碎了的回忆
    2020-11-22 04:24

    before(default)

    implementation fileTree(include: ['*.jar'], dir: 'libs')
    

    just add '*.aar' in include array.

    implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
    

    it works well on Android Studio 3.x.

    if you want ignore some library? do like this.

    implementation fileTree(include: ['*.jar', '*.aar'], exclude: 'test_aar*', dir: 'libs')
    debugImplementation files('libs/test_aar-debug.aar')
    releaseImplementation files('libs/test_aar-release.aar')
    

提交回复
热议问题