【问题标题】:maven-android-plugin No Android API Level has been configuredmaven-android-plugin 未配置 Android API 级别
【发布时间】:2013-11-04 16:25:07
【问题描述】:

我在尝试使用 maven-android-plugin 构建我的 android 项目时遇到此错误:

[错误] 无法在项目 android-input-device 上执行目标 com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.7.0:generate-sources (default-generate-sources):执行目标 com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.7.0:generate-sources 的 default-generate-sources 失败:未配置 Android API 级别。添加例如17到插件配置。 -> [帮助 1]

-即使我在插件的配置中设置了 SDK 版本。这是我 POM 中的一个 sn-p:

<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>

【问题讨论】:

    标签: android maven maven-3 android-maven-plugin


    【解决方案1】:

    升级到最新版本 - 3.8.0 并在仍有问题时报告。这应该可以,但是您使用的版本非常旧,如果它不起作用,我并不感到惊讶。另外 .. 该插件已重命名为 android-maven-plugin。

    【讨论】:

      猜你喜欢
      • 2015-09-27
      • 1970-01-01
      • 2013-09-29
      • 2020-04-16
      • 1970-01-01
      • 1970-01-01
      • 2021-10-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多