错误构建Android项目使用Maven:平台/ API级别16不可用

问题描述:

我其实是编译使用maven一个Android项目: MVN全新安装和我得到这个错误,但不明白为什么会这样

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

未能执行目标com.jayway.maven.plugins.android.generation2:Android的Maven的插件:3.6.0:产生-源项目helloflashlight(默认生成-源):执行默认生成 - 源目标com.jayway.maven.plugins.android.generation2:Android的Maven的插件:3.6.0:产生-源失败:无效的SDK:平台/ API级别16无法使用

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.

我应该怎么办?

我的猜测是,你的应用程序配置了API级别16为构建目标,而不必通过SDK管理器安装。使用SDK管理器来下载API级别16 SDK组件,看看是否有帮助。

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.