android maven plugin does not get ANDROID_HOME env variable in Eclipse

前端 未结 9 2179
[愿得一人]
[愿得一人] 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:09

    Create a file called local.properties in your root directory of your project.

    With the contents;

    sdk.dir=c:\\path\\to\\android-sdk
    
    0 讨论(0)
  • 2021-02-20 12:10

    on your command line, run:

    mvn clean install -- Dandroid.sdk.path="/Applications/Android Studio.app/sdk/"

    none of the other methods really worked. (setting ANDROID_HOME doesn't do anything)

    0 讨论(0)
  • 2021-02-20 12:14

    Setting an ANDROID_HOME variable in your .bashrc or whatever will work, but remember to export that variable so that it is available to subprocesses. Setting ANDROID_HOME with the other methods suggested here will get you through some initial errors, but without ANDROID_HOME exported your build will probably fail at some point.

    0 讨论(0)
提交回复
热议问题