i\'m working on an Android app project and it is a Maven project. when i try to run as \"maven install\" this is what i get:
\"Failed to execute goal com.jayway.maven.pl
From the documentation
You may configure it in the android-maven-plugin
configuration section in the pom.xml
file using
or
or on command-line using -Dandroid.sdk.path=...
or by setting environment variable ANDROID_HOME
.
Solution 1
I have defined an Android SDK system variable called ANDROID_SDK
(instead of ANDROID_HOME
) and referenced it in my pom.xml
this way:
...
...
...
apk
...
...
${env.ANDROID_SDK}
...
Solution 2
As an alternative you can also configure it in the android-maven-plugin
section:
true
com.jayway.maven.plugins.android.generation2
android-maven-plugin
${android-maven-plugin.version}
${project.basedir}/AndroidManifest.xml
${project.basedir}/assets
${project.basedir}/res
${project.basedir}/src/main/native
${env.ANDROID_SDK}
16
true
Solution 3
As a third option you can set the SDK from the command line passing an argument to Maven:
mvn clean install -Dandroid.sdk.path="C:\\Program Files (x86)\\Android\\android-sdk"