问题描述
我想用maven下载support-v4库,所以我先从网站下载了pom文件(support-compat-26.1.0.pom),然后我添加了插件和存储库部分,最后我运行了以下命令:
mvn.cmd -f support-v4-26.1.0.pom dependency:copy-dependencies
插件已成功下载,但在那之后 maven 尝试查找 support-compat-26.1.0.jar
并失败(因为存储库中只有 support-compat-26.1.0.aar
)。
pom 文件包含行 <packaging>aar</packaging>
。插件不工作?我怎么能告诉 Maven 找到 aar 而不是 jar? (把包装改成apk还是不行。)
这是support-compat-26.1.0.pom
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<build>
<plugins>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>4.6.0</version>
<extensions>true</extensions>
<configuration>
<sign>
<debug>false</debug>
</sign>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>google</id>
<url>https://maven.google.com</url>
</repository>
</repositories>
<modelVersion>4.0.0</modelVersion>
<groupId>com.android.support</groupId>
<artifactId>support-v4</artifactId>
<version>26.1.0</version>
<packaging>aar</packaging>
<name>Android Support Library v4</name>
<description>The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs. Compatible on devices running API 14 or later.</description>
<url>http://developer.android.com/tools/extras/support-library.html</url>
<inceptionYear>2011</inceptionYear>
<licenses>
<license>
<name>The Apache Software License,Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<name>The Android Open Source Project</name>
</developer>
</developers>
<scm>
<connection>scm:git:https://android.googlesource.com/platform/frameworks/support</connection>
<url>http://source.android.com</url>
</scm>
<dependencies>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-compat</artifactId>
<version>26.1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-media-compat</artifactId>
<version>26.1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-core-utils</artifactId>
<version>26.1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-core-ui</artifactId>
<version>26.1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-fragment</artifactId>
<version>26.1.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)