Why won't Android Studio create my AAR file in release mode

核能气质少年 提交于 2020-01-02 05:41:11

问题


Using Android Studio, I have an Android library project which produces 'library/build/outputs/aar/MyLIB.aar" just fine in Debug mode, but does not do so in Release mode. I see no errors, just "BUILD SUCCESSFUL" in the "Gradle Console" window but no Release Mode artifact.

There was a similar question raised here, and I'm getting the same behavior as #user1624552 mentions in the link:

"gradlew clean" followed by "gradlew aR" resultd in my AAR being created and correctly placed in the directory above. But using Android Studio and the "Release Mode" Build Variant does NOT create an AAR file.

Is there something configured in the Debug variant which is not configured in the Release variant?

Thanks, ALF


回答1:


Right click the task you want and click "Run".




回答2:


To get the aar, you can do the following

  1. View/Tool Windows/Gradle”, to open the gradle window

  2. From gradle window, run assembly Gradle task by double-click on My_Plugin_Android/:My_Plugin/Tasks/build/assemble



来源:https://stackoverflow.com/questions/34167898/why-wont-android-studio-create-my-aar-file-in-release-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!