我创建了一个 apklib,如下所示:https ://code.google.com/p/maven-android-plugin/wiki/ApkLib
所以我用这个命令创建了 zip/apklib
zip -r listviewanimations.apklib listviewanimations/
然后按如下方式部署到本地 maven
mvn org.apache.maven.plugins:maven-install-plugin:2.4:install-file -DgroupId=com.jmanzano.animations -Dfile=listviewanimations.apklib -DartifactId=library -Dversion=1 -Dpackaging=apklib
现在,将依赖项添加到我的项目中
<dependency>
<groupId>com.jmanzano.animations</groupId>
<artifactId>library</artifactId>
<version>1</version>
<type>apklib</type>
</dependency>
但是当我输入
maven clean package
我收到这个错误
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android- maven-plugin:3.4.0:generate-sources (default-generate-sources) on project com-parkuik- android: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.4.0:generate-sources failed: Cannot read XML from: file:/Users/javiermanzanomorilla/IdeaProjects/parkuik/app/target/unpack/apklibs/com.jmanzano.animations_library_apklib_1/AndroidManifest.xml; /Users/javiermanzanomorilla/IdeaProjects/parkuik/app/target/unpack/apklibs/com.jmanzano.animations_library_apklib_1/AndroidManifest.xml (No such file or directory) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :com-parkuik-android
希望它足够清楚,你可以帮助我