ActionBarSherlock +行家+蚀:不依赖于工作区发现 [英] ActionBarSherlock + maven + eclipse: dependency not found in workspace

查看:226
本文介绍了ActionBarSherlock +行家+蚀:不依赖于工作区发现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经更新到ADT插件的最新版本,我面对这个问题,解决了更新也M2E,Android的日食插入。现在,我可以通过控制台来编译我的项目,但不能与日食。这是引发的异常的pom.xml 文件中的日食:

I've updated to lastest version of ADT Plugin and I faced this issue, solved updating also m2e-android eclipse plugin. Now, I'm able to compile my project through console, but not with eclipse. This is the exception thrown by pom.xml file in eclipse:

相关= [com.actionbarsherlock:库:apklib:4.1.0:编译]不是在工作区中找到

在ADT / M2E-的Andr​​oid previous的版本,我是能够建立控制台和蚀没有问题。

In previous versions of ADT/m2e-android, I was able to build both console and eclipse without problems.

有谁知道如何解决这个问题?也许我的pom.xml的是错的?

感谢您的时间。

目前使用:

  • 在Eclipse的经典3.7.2(与朱诺问题仍然存在)
  • ADT 20.0.3
  • M2E-安卓0.42
  • Android的Maven的插件3.3.0
  • 的Maven 3.0.4
  • M2E 1.1.0(包含在M2E-的Andr​​oid 0.42的依赖)

pom.xml的:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.jelies</groupId>
    <artifactId>my-project</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>apk</packaging>

    <dependencies>
        <dependency>
            <groupId>android</groupId>
            <artifactId>android</artifactId>
            <version>4.1_r2</version>
            <scope>provided</scope>
        </dependency>

        <!-- some unrelated dependencies -->

        <dependency>
            <groupId>com.actionbarsherlock</groupId>
            <artifactId>library</artifactId>
            <version>4.1.0</version>
            <type>apklib</type>
        </dependency>

    </dependencies>

    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                <artifactId>android-maven-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <sdk>
                        <platform>16</platform>
                    </sdk>
                    <emulator>
                        <avd>avd-4.1</avd>
                    </emulator>
                    <deleteConflictingFiles>true</deleteConflictingFiles>
                    <undeployBeforeDeploy>true</undeployBeforeDeploy>
                </configuration>
                <extensions>true</extensions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>eclipse</id>
            <activation>
                <!-- This profile is only activated when m2e.version is present (only 
                    in eclipse) -->
                <property>
                    <name>m2e.version</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.google.android</groupId>
                    <artifactId>support-v4</artifactId>
                    <version>r7</version>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
</project>

编辑:

答案是正确的。有ABS库项目Maven化在我的工作区,错误消失!但是,另一个问题出现了:ABS传递依赖添加到我的项目,造成日食是无法启动应用程序。这是一个已知的问题,你可以按照这里

Answer is right. Having ABS library project mavenized in my workspace, error is gone! But, another problem appeared: ABS transitive dependencies are added to my project, causing eclipse to be not able to launch the application. This is a known issue you can follow here.

推荐答案

由于Android系统0.4.2,你现在需要mavenise了Android库项目在Eclipse工作区M2E-机器人成功地探测到它们。的POM,ActionBarSherlock可以在这里找到:

As of Android 0.4.2 you now need to mavenise the Android library projects in your Eclipse workspace for m2e-android to successfully detect them. The POM for ActionBarSherlock can be found here:

<一个href="https://github.com/JakeWharton/ActionBarSherlock/blob/master/library/pom.xml#">https://github.com/JakeWharton/ActionBarSherlock/blob/master/library/pom.xml#

注意: M2E-Android是测试版软件等的变化,可能会影响功能的版本之间可能会发生

Note: m2e-android is beta software and so changes that might affect functionality can occur between releases.

这篇关于ActionBarSherlock +行家+蚀:不依赖于工作区发现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆