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

環境構築Apache Maven

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

 状態:未解決  閲覧数:2,788  投稿日: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 がインストール出来ない



週間人気ページランキング / 7-27 → 8-2
順位 ページタイトル抜粋 アクセス数
1 Android FAQ 11
2 この行に複数マーカーがあります | エラー(エラー) 4
2 ログイン 4
3 実際に遭遇した例 3
3 Android Studio(IDE) カテゴリー 3
4 キーバインドの競合が発生しました。 通常のアクセラレーター操作を妨げる可能性があります。 | エラー(エラー) 2
4 run build する際、選択画面が表示されない | Android Studio(IDE) 2
4 Android Studio で、ソースコードが改行できない | Android Studio(IDE) 2
4 Eclipse で「プロジェクト名」「パッケージ名」を変更する方法 | Eclipse(IDE) 2
4 Eclipse … コメントアウト | Eclipse(IDE) 2
4 インポートされたRは見つかりません | エラー(エラー) 2
4 Failed to execute goal com.jayway.maven.plugins.android.generation2: | Apache Maven(環境構築) 2
4 メソッド onCreate(Bundle) は型 Object で未定義です | エラー 2
4 ActivityManager: 警告: Activity not started, its current task has been brought to the front | 警告(エラー) 2
4 「アプリケーション名」変更 | アプリケーション(環境構築) 2
4 警告(エラー) カテゴリー 2
4 既存JAVAプロジェクトをKotlinへ変換 | Kotlin(環境構築) 2
4 具体例 2
5 内部エラーの表示中に内部エラーが発生しました | エラー 1
5 Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties | エラー(エラー) 1
2026/8/3 5:05 更新