【问题标题】:Error while importing own project from maven从maven导入自己的项目时出错
【发布时间】:2013-03-16 12:22:56
【问题描述】:

我创建了一个 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

希望它足够清楚,你可以帮助我

【问题讨论】:

    标签: java android maven android-maven-plugin


    【解决方案1】:

    已解决,我只是创建了错误的 Zip。它在 src 和 top 之间有一个文件夹

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-15
      • 2012-10-03
      相关资源
      最近更新 更多