I'm getting this error when trying to build my android project using maven-android-plugin
:
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.7.0:generate-sources (default-generate-sources) on project android-input-device: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.7.0:generate-sources failed: No Android API Level has been configured. Add e.g. 17 to the plugin configuration. -> [Help 1]
-even though I've set the SDK version in the configuration of the plugin. Here's a snippet from my POM:
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>maven-android-plugin</artifactId>
<version>3.0.0-alpha-11</version>
<configuration>
<sdk>
<platform>11</platform>
</sdk>
<emulator>
<avd>21</avd>
</emulator>
<fork>true</fork>
<deleteConflictingFiles>true</deleteConflictingFiles>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
Upgrade to the latest version - 3.8.0 and report back if you still have issues. This should work but the version you are using is VERY old and I am not surprised if it is not working. Also .. the plugin has been renamed to android-maven-plugin.