7

I was actually compiling a android project using maven: mvn clean install and i got this error but don't understand why this is happening

Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:generate-sources (default-generate-sources) on project helloflashlight: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:generate-sources failed: Invalid SDK: Platform/API level 16 not available.

What should I do?

Robert Munteanu
  • 67,031
  • 36
  • 206
  • 278
Sree
  • 1,694
  • 1
  • 18
  • 29
  • 1
    This happened to me while building the project through Android Studio terminal. When I tried to build via mvn console (using "mvn clean compile" for instance) everything went smoothly. – naXa stands with Ukraine Dec 03 '14 at 12:13
  • See also: [How to install platform tools](https://developer.android.com/studio/command-line/sdkmanager), [Check which version is currently available](https://stackoverflow.com/questions/24447687/how-to-check-the-android-developer-tools-version-from-the-command-line) – user202729 Mar 22 '20 at 02:51

1 Answers1

7

My guess is that your app is configured with API Level 16 as the build target, and you do not have that installed through the SDK Manager. Use the SDK Manager to download the API Level 16 SDK components, and see if that helps.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491