Failed to execute goal com.jayway.maven.plugins.android.generation2:

環境構築Apache Maven

Mavenによるプロジェクトビルドが失敗

 状態:未解決  閲覧数:2,684  投稿日:2014-02-18  更新日:2014-02-20
mvn clean package


エラーメッセージ


[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:generate-sources (default-
generate-sources) on project ★★: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generatio
n2:android-maven-plugin:3.6.0:generate-sources failed: A required class was missing while executing com.jayway.maven.plugins.andr
oid.generation2:android-maven-plugin:3.6.0:generate-sources: Lorg/sonatype/aether/RepositorySystem;


原因


・AndroidのMavenプラグインは、Maven3.1と互換性がないから


対策案A


Apacheベースのmaven-3.0.5を使用
・maven-3.0.5を試すもエラー
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:generate-sources (de
generate-sources) on project android-style: Execution default-generate-sources of goal com.jayway.maven.plugins.android.gen
n2:android-maven-plugin:3.6.0:generate-sources failed: Invalid SDK: Platform/API level 16 not available. This command shoul
you all you need:
[ERROR] D:\Android\android-sdk;\tools\android update sdk --no-ui --obsolete --force
3.1.1へ戻す


対策案B


android-maven-pluginをインストール
The Central Repository Search Engine



Apache Maven がインストール出来ない



週間人気ページランキング / 3-2 → 3-8
順位 ページタイトル抜粋 アクセス数
1 Android FAQ 13
2 ★★ を型に解決できません | エラー(エラー) 4
3 Unexpected error while launching logcat | エラー(エラー) 3
4 Sorry! The application ★★ has stopped unexpectedly.Please try again. | エラー(エラー) 2
4 エラー対応 2
4 R.java was modified manually! Reverting to generated version! | エラー(エラー) 2
5 [エラー] W/ResourceType(308): Failure getting entry for 0x7f030001 (t=2 e=1) in package 0: 0xffffffb5 | エラー(エラー) 1
5 Project build error: Non-resolvable parent POM: Failure to find | エラー 1
5 adb shell … error: device not found | Android Debug Bridge (adb) 1
5 インポートされた ★★ は見つかりません | エラー 1
5 ログイン 1
5 アプリをビルドして実行する | アプリ化(環境構築) 1
5 Project has no project.properties file! Edit the project properties to set one. | エラー(エラー) 1
5 Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties | エラー(エラー) 1
5 E/AudioPlayer(★★): FAILED renaming /mnt/sdcard/tmprecording.3gp to /android_asset/●●.mp3 | エラー 1
5 E/Trace(★★): error opening trace file: No such file or directory | エラー(エラー) 1
5 emulator-5554 disconnected! Cancelling | エラー(エラー) 1
5 この行に複数マーカーがあります | エラー(エラー) 1
2026/3/9 5:05 更新