我在我正在Eclipse中开发的Android应用程序中使用FFmpegMediaMetadataRetriever(以下称FMMR)。我正在尝试将其转换为Maven项目,这是造成麻烦的最后一个依赖项。
Maven可以正确下载FMMR,但是在Eclipse中它未链接到“ Maven Dependencies”,并且将其导入到一个类中时会出现错误“无法解析导入的wseemann”。其他依赖项可以正常工作。
FMMR以APK的形式分发;其他是JAR。
完整的POM为:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.pconley</groupId>
<version>0.0.1-SNAPSHOT</version>
<packaging>apk</packaging>
<artifactId>TestApp</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.wseemann</groupId>
<artifactId>FFmpegMediaMetadataRetriever</artifactId>
<version>1.0.0</version>
<scope>runtime</scope>
<type>apk</type>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src</sourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.9.0-rc.3</version>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<sdk>
<platform>21</platform>
</sdk>
<testCoverageFile>/data/data/com.github.pconley.TestApp/cache/test-coverage.ec</testCoverageFile>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
一些注意事项:
我是在做错什么,还是FMMR APK的构建方式不正确?
我今天早上解决了包装问题,只需将以下行添加到您的模块build.gradle
文件中:
compile 'com.github.wseemann:FFmpegMediaMetadataRetriever:1.0.5
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句