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.plugins.android.generation2:android-maven-plugin:3.1.1:generate-sources (default-generate-sources) on project android-client: No Android SDK path could be found. You may configure it in the plugin configuration section in the pom file using … or … or on command-line using -Dandroid.sdk.path=… or by setting environment variable ANDROID_HOME -> [Help 1]”
if i hardcode my android_home path into pom.xml,it works fine but we use git and everyone may have different paths for android_home.why doesn’t android-maven-plugin get env variable in eclipse?
android_home env variable is in my PATH.
i wrote ${env.ANDROID_HOME} in my pom.xml but it still didn’t work.
strangely,if i use terminal (mvn install) to run as maven install,it works!
actually this is quite optional problem for me but still i want to know why this plugin does not work in Eclipse.
You need to create a system variable for ANDROID_HOME, not set it in your PATH.