How to create a release android library package (aar) in Android Studio (not debug)

后端 未结 9 809
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-02 07:50

I have built my android library package (aar) and the result of build is created in \"..\\app\\build\\outputs\\aar\" folder. The file within this folder is called \"app-deb

9条回答
  •  执笔经年
    2020-12-02 08:37

    Yet another 2 part question where nobody answers the second part...

    For the future generations, here are simple answers:

    Part 1 How to create release only *release.aar ?

    Run in android studio terminal (or any terminal in your project folder).:

    ./gradlew assembleRelease
    

    You don`t need signing config for such task.

    Part 2 How to rename the output library to AnotherLibraryName-release.aar ?

    Add to your module gradle.build :

    android{
        project.archivesBaseName = "AnotherLibraryName"
    }
    

提交回复
热议问题