简体   繁体   English

如何生成我的Android项目的aar和apk

[英]How can I generate both an aar and apk of my Android project

I am developing an Android library in Android Studio. 我正在Android Studio中开发一个Android库。

I have also created a dummy android application project to import that library and test it. 我还创建了一个虚拟的android应用程序项目来导入该库并对其进行测试。 For that reason I have imported my android library as a Library into this android application. 因此我将我的android库作为导入到这个android应用程序中。 My problem is that when I generate the apk in the output folder I can only see the apk and there is no folder for the generated aar. 我的问题是,当我在输出文件夹中生成apk时,我只能看到apk,并且没有生成aar的文件夹。

How can I generate my aar? 我怎样才能产生我的耳朵?

So i figured this out, it wasn't difficult but I'll just post the answer here just in case I save someone of time. 所以我想出来了,这并不难,但我会在这里发布答案以防万一我节省了时间。 When I selected build apk the aar isn't built in the outputs of the main project, however it's built in the outputs of the respective library. 当我选择构建apk时,aar不是在主项目的输出中构建的,但它是在相应库的输出中构建的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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