• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How do I create an AAR in Android Studio with Prefab exports?

Dan Coleman

Lurker
Aug 22, 2019
2
0
I have an Android project for a library (using the com.android.library plugin), that includes C++ code. When I run the assemble task in gradle, the outputted AAR contains the native library in the /jni folder. However, there is no "prefab" folder. On the documentation page for libraries, the bottom section suggests that the /prefab folder should be there.

I can find information on how to set up a project to import prefabs from an AAR, but I can't find any information on how to build an AAR with prefab exports. Is there a way to set up an Android project with gradle to do this? Are there settings I have to add to specify which native libraries should be exposed?

I'm using Android Studio 4.1.1, gradle 6.8, and Android gradle plugin 4.1.1.
 
Last edited:

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones