gpt4 book ai didi

android - 无法将兼容包添加到android项目

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:18:31 27 4
gpt4 key购买 nike

我在将兼容包添加到我的 android 项目时遇到问题。

不太确定该怎么办。任何想法表示赞赏。错误发生在底部,似乎与我的本地主机的连接被拒绝。

这是我看到的控制台输出:

[2011-11-12 01:44:13 - SDK Manager] Fetching https://dl-ssl.google.com/android/repository/addons_list-1.xml
[2011-11-12 01:44:14 - SDK Manager] Validate XML
[2011-11-12 01:44:14 - SDK Manager] Parse XML
[2011-11-12 01:44:14 - SDK Manager] Fetched Add-ons List successfully
[2011-11-12 01:44:14 - SDK Manager] Fetching URL: https://dl-ssl.google.com/android/repository/repository-5.xml
[2011-11-12 01:44:15 - SDK Manager] Validate XML: https://dl-ssl.google.com/android/repository/repository-5.xml
[2011-11-12 01:44:15 - SDK Manager] Parse XML: https://dl-ssl.google.com/android/repository/repository-5.xml
[2011-11-12 01:44:15 - SDK Manager] Found SDK Platform Android 1.1, API 2, revision 1 (Obsolete)
[2011-11-12 01:44:15 - SDK Manager] Found SDK Platform Android 1.5, API 3, revision 4
[2011-11-12 01:44:15 - SDK Manager] Found SDK Platform Android 1.6, API 4, revision 3
[2011-11-12 01:44:15 - SDK Manager] Found SDK Platform Android 2.0, API 5, revision 1 (Obsolete)
[2011-11-12 01:44:15 - SDK Manager] Found SDK Platform Android 2.0.1, API 6, revision 1 (Obsolete)
[2011-11-12 01:44:15 - SDK Manager] Found SDK Platform Android 2.1, API 7, revision 3
[2011-11-12 01:44:15 - SDK Manager] Found SDK Platform Android 2.2, API 8, revision 3
[2011-11-12 01:44:15 - SDK Manager] Found SDK Platform Android 2.3.1, API 9, revision 2 (Obsolete)
[2011-11-12 01:44:15 - SDK Manager] Found SDK Platform Android 2.3.3, API 10, revision 2
[2011-11-12 01:44:15 - SDK Manager] Found SDK Platform Android 3.0, API 11, revision 2
[2011-11-12 01:44:15 - SDK Manager] Found SDK Platform Android 3.1, API 12, revision 3
[2011-11-12 01:44:15 - SDK Manager] Found SDK Platform Android 3.2, API 13, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found SDK Platform Android 4.0, API 14, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found ARM EABI v7a System Image, Android API 14, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found Samples for SDK API 7, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found Samples for SDK API 8, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found Samples for SDK API 9, revision 1 (Obsolete)
[2011-11-12 01:44:15 - SDK Manager] Found Samples for SDK API 10, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found Samples for SDK API 11, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found Samples for SDK API 12, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found Samples for SDK API 13, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found Samples for SDK API 14, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found Android SDK Platform-tools, revision 9
[2011-11-12 01:44:15 - SDK Manager] Found Android SDK Tools, revision 15
[2011-11-12 01:44:15 - SDK Manager] Found Documentation for Android SDK, API 14, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found Android Support package, revision 4
[2011-11-12 01:44:15 - SDK Manager] Fetching URL: https://dl-ssl.google.com/android/repository/addon.xml
[2011-11-12 01:44:15 - SDK Manager] Validate XML: https://dl-ssl.google.com/android/repository/addon.xml
[2011-11-12 01:44:15 - SDK Manager] Parse XML: https://dl-ssl.google.com/android/repository/addon.xml
[2011-11-12 01:44:15 - SDK Manager] Found Google APIs by Google Inc., Android API 3, revision 3
[2011-11-12 01:44:15 - SDK Manager] Found Google APIs by Google Inc., Android API 4, revision 2
[2011-11-12 01:44:15 - SDK Manager] Found Google APIs by Google Inc., Android API 5, revision 1 (Obsolete)
[2011-11-12 01:44:15 - SDK Manager] Found Google APIs by Google Inc., Android API 6, revision 1 (Obsolete)
[2011-11-12 01:44:15 - SDK Manager] Found Google APIs by Google Inc., Android API 7, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found Google APIs by Google Inc., Android API 8, revision 2
[2011-11-12 01:44:15 - SDK Manager] Found Google APIs by Google Inc., Android API 9, revision 2 (Obsolete)
[2011-11-12 01:44:15 - SDK Manager] Found Google APIs by Google Inc., Android API 10, revision 2
[2011-11-12 01:44:15 - SDK Manager] Found Google APIs by Google Inc., Android API 11, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found Google APIs by Google Inc., Android API 12, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found Google APIs by Google Inc., Android API 13, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found Google APIs by Google Inc., Android API 14, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found Google TV Addon by Google Inc., Android API 12, revision 2
[2011-11-12 01:44:15 - SDK Manager] Found Google Market Licensing package, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found Google USB Driver package, revision 4
[2011-11-12 01:44:15 - SDK Manager] Found Google Market Billing package, revision 1
[2011-11-12 01:44:15 - SDK Manager] Found Google Admob Ads Sdk package, revision 4
[2011-11-12 01:44:15 - SDK Manager] Found Google Webdriver package, revision 2
[2011-11-12 01:44:15 - SDK Manager] Fetching URL: http://www.echobykyocera.com/download/echo_repository.xml
[2011-11-12 01:44:15 - SDK Manager] Failed to fetch URL http://www.echobykyocera.com/download/echo_repository.xml/addon.xml, reason: Connection to http://127.0.0.1:8888 refused
[2011-11-12 01:44:15 - SDK Manager] Fetching URL: http://developer.lgmobile.com/sdk/android/repository.xml
[2011-11-12 01:44:15 - SDK Manager] Failed to fetch URL http://developer.lgmobile.com/sdk/android/repository.xml/addon.xml, reason: Connection to http://127.0.0.1:8888 refused
[2011-11-12 01:44:15 - SDK Manager] Fetching URL: http://innovator.samsungmobile.com/android/repository/repository.xml
[2011-11-12 01:44:15 - SDK Manager] Failed to fetch URL http://innovator.samsungmobile.com/android/repository/repository.xml/addon.xml, reason: Connection to http://127.0.0.1:8888 refused
[2011-11-12 01:44:15 - SDK Manager] Fetching URL: http://developer.sonyericsson.com/edk/android/repository.xml
[2011-11-12 01:44:16 - SDK Manager] Failed to fetch URL http://developer.sonyericsson.com/edk/android/repository.xml/addon.xml, reason: Connection to http://127.0.0.1:8888 refused
[2011-11-12 01:44:16 - SDK Manager] Done loading packages.
[2011-11-12 01:44:16 - Android Compatibility JAR not found:] /apps/eclipse64/Eclipse.app/Contents/MacOS/v4/android-support-v4.jar

最佳答案

在 Eclipse 中,您可以创建一个“用户库”,添加您需要的兼容 jar(v4 或 v13)并将此用户库添加到您的构建路径中。下面是一个简短的步骤计划:

  1. 从菜单中选择项目 -> 属性
  2. 选择“Java 构建路径”
  3. 转到“库”选项卡,然后选择“添加库”
  4. 选择“用户库”
  5. 选择“用户库”
  6. 选择“新建”
  7. 为您的库命名,例如“Android-Compatibility-v4”
  8. 在左 Pane 中创建后,按添加 JARS
  9. 选择兼容 jar,例如 D:\Programs\android-sdk-windows\extras\android\support\v4\android-support-v4.jar
  10. 您返回到用户库 Pane 。选择“确定”。您将看到添加了这个新的用户库并选中了复选框。按“完成”。按“确定”

您的项目现在应该在构建路径中添加了兼容性 jar。笔记。按“Android 工具”->“添加兼容性库”仍然无效,但至少您的项目现在包含所需的库,您可以工作了。

第二个选项是创建一个 Lib 并在其中添加 jar:http://developer.android.com/sdk/compatibility-library.html (设置项目以使用库)

关于android - 无法将兼容包添加到android项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8103055/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com