Sunday, May 19, 2013

[android help] maven dependency installation failure

android - maven dependency installation failure - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















I am building an Android project with Eclipse and maven plugins. When I build it I get the error as following



27/1/12 2:34:02 PM IST: Build errors for ProjectName; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal


com.jayway.maven.plugins.android.generation2:maven-android-plugin:2.2.1:generate-sources (default-generate-sources) on project ProjectName: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:maven-android-plugin:2.2.1:generate-sources failed: Please provide a proper Android SDK directory path as configuration parameter ... in the plugin .


As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or by setting environment variable ANDROID_HOME



Even if I have set the ANDROID_HOME and path in ...





























Besides ANDROID_HOME environment variable, you also need add $ANDROID_HOME/tools and $ANDROID_HOME/platform-tools to your PATH environment variable:



Maven 3.0.3+ installed, see http://maven.apache.org/download.html


  1. Set environment variable ANDROID_HOME to the path of your installed Android SDK and add $ANDROID_HOME/tools as well as $ANDROID_HOME/platform-tools to your $PATH. (or on Windows %ANDROID_HOME%\tools and %ANDROID_HOME%\platform-tools).

  2. MacOS users: Note that for the path to work on the commandline and in IDE's started by launchd you have to set it in /etc/launchd.conf and NOT in .bashrc or something else


Check out the Getting Started page on android maven plugin website here.


Hope this help.























You also need to set the path location of the Android SDK in Eclispe as well, otherwise the m2e-android build will fail:


Go to Window -> Preferences and select Android. Click on the Browse... button next to the SDK Location text box and select the location of you locally installed Android SDK. Click Apply and then OK and your build should now work.




















default






.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...