[英]How to add a 3rd party local maven repository to android project
I have been provided an SDK to work on, which contains a maven-local-metadata file, an.aar file, .pom file and.jar file.我得到了一个 SDK 来处理,它包含一个 maven-local-metadata 文件、an.aar 文件、.pom 文件和.jar 文件。 How do I add this to my project.如何将其添加到我的项目中。 I tried pasting it to the local.m2 file but it didn't work (is there any specific way)and also adding as a new.aar/.jar module in the file option didn't work.我尝试将它粘贴到 local.m2 文件,但它不起作用(有什么特定的方法)并且在文件选项中添加为 new.aar/.jar 模块也不起作用。 any help would be greatly appreciated.任何帮助将不胜感激。
When pointing to dependencies that are residing within your system, you can create a lib folder and copy/move the jar files, but make sure to specify the location of the jar files in the pom.xml当指向驻留在系统中的依赖项时,您可以创建一个 lib 文件夹并复制/移动 jar 文件,但请确保在 pom.Z0F635D0E0F3874FFF8AB58C61 中指定 jar 文件的位置
<dependency>
<groupId>com.some.group</groupId>
<artifactId>jar-name</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/yourJar.jar</systemPath>
</dependency>
Just add the files in the local.m2 repository in the correct structure and youre good.只需以正确的结构添加 local.m2 存储库中的文件,就可以了。 no need to add in the libs folder.无需添加到 libs 文件夹中。
Note - If working with.aar files just as a modules注意 - 如果将 .aar 文件作为模块使用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.