Tycho找不到Android开发工具包束。

3
我正在尝试构建一个插件+功能,它依赖于com.android.ide.eclipse.adt包。为此,我已将ADT存储库添加到主pom.xml中:
<repository>
  <id>adt</id>
  <layout>p2</layout>
  <url>http://dl-ssl.google.com/android/eclipse</url>
</repository>

现在编译失败,并显示以下错误:
[INFO] Adding repository http://dl-ssl.google.com/android/eclipse
[INFO] Fetching site.xml (0B of 1,8kB at 0B/s) from http://dl-ssl.google.com/android/eclipse/
[INFO] 1 operation remaining.
[INFO] Fetching site.xml (1,8kB of 1,8kB at 0B/s) from http://dl-ssl.google.com/android/eclipse/
[INFO] Adding repository http://dl-ssl.google.com/android/eclipse
[INFO] Resolving dependencies of MavenProject: me.fixpoint.eared:me.fixpoint.eared.plugin:0.0.4-SNAPSHOT @ D:\Projects\eared\plugin\pom.xml
[INFO] Cannot complete the request.  Generating details.
[INFO] Cannot complete the request.  Generating details.
[INFO] {osgi.ws=win32, osgi.os=win32, osgi.arch=x86_64, org.eclipse.update.install.features=true}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: me.fixpoint.eared 0.4.0
[ERROR]   Missing requirement: me.fixpoint.eared 0.4.0 requires 'bundle com.android.ide.eclipse.adt 0.0.0' but it could not be found
[ERROR]
[ERROR] Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from me.fixpoint.eared 0.4.0 to bundle com.android.ide.eclipse.adt 0.0.0.", "No solution found because the problem is unsatisfiable."] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from me.fixpoint.eared 0.4.0 to bundle com.android.ide.eclipse.adt 0.0.0.", "No solution found because the problem is unsatisfiable."]

我已经尝试按照这个主题的建议:https://groups.google.com/group/adt-dev/tree/browse_frm/month/2012-07/39c71d32169b9569?rnum=51&_done=/group/adt-dev/browse_frm/month/2012-07?&pli=1,并在http://dl.dropbox.com/u/1236385/adt创建了一个p2更新站点,但错误仍然存在。
[INFO] Adding repository http://dl.dropbox.com/u/1236385/adt
[INFO] Fetching content.jar (0B of 18,09kB at 0B/s) from http://dl.dropbox.com/u/1236385/adt/
[INFO] 1 operation remaining.
[INFO] Fetching content.jar (3,97kB of 18,09kB at 0B/s) from http://dl.dropbox.com/u/1236385/adt/
[INFO] Adding repository http://dl.dropbox.com/u/1236385/adt
[INFO] Fetching artifacts.jar (0B of 783B at 0B/s) from http://dl.dropbox.com/u/1236385/adt/
[INFO] 1 operation remaining.
[INFO] Fetching artifacts.jar (783B of 783B at 0B/s) from http://dl.dropbox.com/u/1236385/adt/
[INFO] Resolving dependencies of MavenProject: me.fixpoint.eared:me.fixpoint.eared.plugin:0.0.4-SNAPSHOT @ D:\Projects\eared\plugin\pom.xml
[INFO] Cannot complete the request.  Generating details.
[INFO] Cannot complete the request.  Generating details.
[INFO] {osgi.ws=win32, osgi.os=win32, osgi.arch=x86_64, org.eclipse.update.install.features=true}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: me.fixpoint.eared 0.4.0
[ERROR]   Missing requirement: me.fixpoint.eared 0.4.0 requires 'bundle com.android.ide.eclipse.adt 0.0.0' but it could not be found
[ERROR]
[ERROR] Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from me.fixpoint.eared 0.4.0 to bundle com.android.ide.eclipse.adt 0.0.0.", "No solution found because the problem is unsatisfiable."] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from me.fixpoint.eared 0.4.0 to bundle com.android.ide.eclipse.adt 0.0.0.", "No solution found because the problem is unsatisfiable."]

为什么找不到 com.android.ide.eclipse.adt
以防万一,这里是主POM的链接
1个回答

3
旧式的更新站点只有关于构件依赖性的不完整元数据。然而,Tycho需要完整的依赖性元数据来进行其依赖性解析机制,因此无法使用旧式的更新站点。Dropbox站点可能采用现代p2存储库格式,但它包含相同的不完整元数据(在p2术语中,这些具有不完整元数据的条目称为“部分IU”)。在Tycho 0.18.0之前,这些部分IU会被默默地丢弃,导致描述的解析问题。这已经在Tycho 0.18.0中得到改进:从那个版本开始,Tycho将失败并显示指向包含不完整元数据的存储库的错误消息。
要解决您的问题,最好向项目提供适当的p2存储库。p2提供了不同的发布应用程序来完成此操作。理论上,您也可以自己调用发布应用程序,但这确实只是一个临时解决方法。

未来在处理p2存储库时,可以参考以下提示:Igor的p2浏览器是一个非常好用的工具,可以帮助您分析它们。 - oberlies

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接