Create an AAR with multiple AARs/JARs

后端 未结 3 1365
闹比i
闹比i 2020-12-01 21:47

I have seen questions (Android Studio combine 2 .aar into one and others) posted by various developers but I haven\'t seen a definitive response that enables me to create an

3条回答
  •  鱼传尺愫
    2020-12-01 22:37

    I was able to address the issue by following Stan Kurdziel 's suggestion: stackoverflow.com/questions/30052058/multiple-aar-files and here are steps I took to arrive at a solution:

    • I created an AAR which I published to the local maven repository
    • Now this AAR was accessible in the application project
    • This AAR also had reference to the classes in the core and midware libraries. I followed Stan Kurdziel's approach #2:

    Manually add the dependency on Library Project 2 to the Application Project - so that your Application has a dependency line for both Libraries. Depending on your specific situation this may or may not be a workable solution.

    Hope this helps others that might run into similar issue.

提交回复
热议问题