ADTプラグインの最新バージョンに更新しましたが、この問題に直面し、m2e-androideclipseプラグインの更新も解決しました。これで、コンソールからプロジェクトをコンパイルできますが、Eclipseではコンパイルできません。pom.xml
これは、 Eclipseのファイルによってスローされる例外です。
dependency=[com.actionbarsherlock:library:apklib:4.1.0:compile] not found in workspace
以前のバージョンのADT/m2e-androidでは、コンソールとEclipseの両方を問題なくビルドできました。
誰かがこれを解決する方法を知っていますか?たぶん私のpom.xmlが間違っていますか?
御時間ありがとうございます。
現在使用しているもの:
- Eclipseクラシック3.7.2(Junoを使用すると問題は解決しません)
- ADT 20.0.3
- m2e-android 0.42
- android-maven-plugin 3.3.0
- Maven 3.0.4
- m2e 1.1.0(m2e-android 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ライブラリプロジェクトを管理することで、エラーはなくなりました。しかし、別の問題が発生しました。ABSの推移的な依存関係がプロジェクトに追加され、eclipseがアプリケーションを起動できなくなりました。これは、ここでフォローできる既知の問題です。