2

ここに示すように、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

それが十分に明確であり、あなたが私を助けてくれることを願っています

4

1 に答える 1

0

解決しました。間違った Zip を作成していました。src と top の間にフォルダーがありました

于 2013-03-16T17:21:11.260 に答える