【问题标题】:Tycho can't find Android Development Tools bundlesTycho 找不到 Android 开发工具包
【发布时间】:2012-09-28 20:46:37
【问题描述】:

我正在尝试构建一个依赖于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

以防万一,here's link to the master POM

【问题讨论】:

    标签: android eclipse maven tycho


    【解决方案1】:

    旧式更新站点只有关于工件依赖关系的不完整元数据。然而,Tycho 需要完整的依赖元数据用于其依赖解析机制,因此不能使用旧式更新站点。 Dropbox 站点可能采用现代 p2 存储库格式,但它包含相同的、不完整的元数据。 (在 p2 中,这些元数据不完整的条目称为“部分 IU”。)在 Tycho 0.18.0 之前,这些部分 IU 被静默删除,导致所描述的分辨率问题。这在Tycho 0.18.0 中得到了改进:从那个版本开始,Tycho 失败并显示错误消息,指向包含不完整元数据的存储库。

    要解决您的问题,最好要求项目提供适当的 p2 存储库。 p2 提供不同的publisher applications 来执行此操作。理论上,您也可以自己调用发布者应用程序,但这实际上应该只是一种临时解决方法。

    【讨论】:

    • 对 p2 存储库未来问题的提示:Igor's p2 browser 是分析它们的好工具。
    猜你喜欢
    • 2023-03-07
    • 2011-05-22
    • 2016-10-21
    • 2015-10-17
    • 1970-01-01
    • 2015-01-08
    • 1970-01-01
    • 1970-01-01
    • 2021-05-16
    相关资源
    最近更新 更多