Android maven的配置問題

來源:互聯網
上載者:User

標籤:

我們下載svn上的android-maven項目,可能配置會報錯如下:

Plugin execution not covered by lifecycle configuration:

 com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.8.2:consume-aar (execution:

 default-consume-aar, phase: compile)

搜了很多解決方案,覺得這個方案最靠譜,如下:

首先在eclipse中點 windows-preference-maven-lifecycle mapping ,點擊“open workspace ...mappings metdata”,然後編輯如下內容:

<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
    <pluginExecutions>
   
        <pluginExecution>
            <pluginExecutionFilter>
                <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                <artifactId>android-maven-plugin</artifactId>
                <goals>
                    <goal>compile</goal>
                    <goal>generate-sources</goal>
                    <goal>proguard</goal>
                    <goal>process-classes</goal>
                </goals>
                <versionRange>[3.5,)</versionRange>
            </pluginExecutionFilter>
            <action>
                <ignore />
            </action>
        </pluginExecution>
       
    </pluginExecutions>
</lifecycleMappingMetadata>

groupId 和 artifactId 的內容就是pom.xml報錯的外掛程式名字,而那組goals的內容,就是在報錯資訊中一段文本中,如phase: compile,那麼就加一個<goal>compile></goal>,如果還有錯誤如phase:generate-sources,同理再加一個<goal> 然後儲存在預設的工作空間的.../.metadata/.plugins/org.eclipse.m2e.core/lifecycle-mapping-metadata.xml最後點擊“reload workspaces lifecycle mappings metdata”

 

 

Android maven的配置問題

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.