源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

Eclipse中查看android工程代码出现"android.jar has no source attachment"的解决方案

  • 时间:2022-02-10 09:38 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:Eclipse中查看android工程代码出现"android.jar has no source attachment"的解决方案
[b]问题描述[/b] Source not found The JAR file D:\.....\sdk\platforms\android-17\android.jar has no source attachment. [img]http://files.jb51.net/file_images/article/201605/2016052310243710.png[/img] 提示就是找不到android.jar对应的source code [b]解决办法:[/b] 由于我的工程创建时选择的Target SDK 和 Compile with选项 均为android4.2.2,对应的api是17,因此就是eclipse找不到android api 17中的android.jar的源代码。 [b]1. 使用SDK Manager下载4.2.2版本的Sources for Android SDK[/b] [img]http://files.jb51.net/file_images/article/201605/2016052310243711.png[/img] [img]http://files.jb51.net/file_images/article/201605/2016052310243712.png[/img] 找到 [b]D:/adt-bundle-windows-x86_64-20130522/sdk/sources/android-17 [/b]点击OK后源代码就显示出来了 ================ [b]2013.10.9更新:[/b] 可能是使用了android4.3(API 18)新的api,今天使用Eclipse/ADT Bundle出现了 the source attachment does not contain the source for the file *.class 的问题,而指定的源代码目录是没有问题的,问题竟然是编码问题。 上图中的Encoding选项修改为UTF-8,问题解决。 以上就是本文的全部内容,希望对大家的学习有所帮助。
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部