android maven plugin does not get ANDROID_HOME env variable in Eclipse

前端 未结 9 2183
[愿得一人]
[愿得一人] 2021-02-20 11:23

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

9条回答
  •  太阳男子
    2021-02-20 12:04

    Another way is to set the environment variable into run configuration for pom.xml.

    Go to Run Configurations menu, select the Run configuration used for your project pom.xml and select the Environment Tab and select "New", then insert:

    • ANDROID_HOME into name Field
    • path to your sdk into value field

    It works, and in that way the Variable is set only when you launch the maven configuration for selected projec, and you can also set different path for different projects, and you don't need to change your .bashrc. It work also in windows.

提交回复
热议问题