Question

I've created an apklib as is shown here: https://code.google.com/p/maven-android-plugin/wiki/ApkLib

So I create the zip/apklib with this command

zip -r listviewanimations.apklib listviewanimations/

And then deploy to local maven as follow

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

Now, add the dependency to my project

  <dependency>
        <groupId>com.jmanzano.animations</groupId>
        <artifactId>library</artifactId>
        <version>1</version>
        <type>apklib</type>
    </dependency>

But when I type

maven clean package

I get this error

[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

Hope it's clear enough and you can help me

Was it helpful?

Solution

Solved, I was just creating the wrong Zip. It had a folder between src and top

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top