最近升级了As,然后忽然就关联不上源码了,很不方便,找个Activity的源码都只有outline没有解释,还提示这个错误:

Decompiled .class file, bytecode version: Souces for android api 23 platform not found

在D:\Android\sdk\sources\android-23明明下载了源码,找了半天,原来是AS的默认配置有问题。最后的解决方法在 StackOverFlow的这个帖子上:

Sources for Android API 23 Platfrom not found (Android Studio 2.0)

0down voteaccepted

For people facing the same problem, the solution is in this post for Linux and in the same topic here for Windows (thanks to Aamir Abro). Basically you have to edit jdk.table.xml file for API level you are missing. I don't know why, but Android 2.0 and 2.1 RC don't have filled <root type="composite" />in <sourcePath>. I updated sources' path <root type="simple" url="file://D:/android/sdk/sources/android-23" /> and now it works.

Windows file locationC:\Users{USER_NAME}.AndroidStudio2.0\config\options\jdk.table.xml

Linix file location~/Library/Preferences/AndroidStudioBeta/options/jdk.table.xml

具体操作是:找到jdk.table.xml这个文件,在<sourcePath>节点下添加这一句<root type="simple" url="file://D:/android/sdk/sources/android-23" />

修改后的部分配置文件如下:

<jdk version="2">
<name value="Android API 23 Platform" />
<type value="Android SDK" />
<homePath value="D:\Android\sdk" />
<roots>
<annotationsPath>
<root type="composite">
<root type="simple" url="jar://$APPLICATION_HOME_DIR$/plugins/android/lib/androidAnnotations.jar!/" />
</root>
</annotationsPath>
<classPath>
<root type="composite">
<root type="simple" url="jar://D:/Android/sdk/platforms/android-23/android.jar!/" />
<root type="simple" url="file://D:/Android/sdk/platforms/android-23/data/res" />
</root>
</classPath>
<javadocPath>
<root type="composite">
<root type="simple" url="file://D:/Android/sdk/docs/reference" />
</root>
</javadocPath>
<sourcePath>
<root type="composite">
<root type="simple" url="file://D:/Android/sdk/sources/android-23" />
</root>
</sourcePath>
</roots>
<additional jdk="1.7" sdk="android-23" />
</jdk>

Android Studio无法关联Api23源码-提示Souces for android api 23 platform not found的更多相关文章

  1. 如何用Android Studio查看build.gradle源码

    上一篇博客里讲过 build.gradle 里的每一行代码基本都是在调用一个方法,既然是这样,我们就可以用 android studio(下面简称as) 去查看它源码的方法注释说明,这样就可以理解每个 ...

  2. Android studio导入第三方类库源码以及jar包

    新建一个Android项目,项目结构如下: 1.添加第三方类库源码 首先将第三方类库考入与app同级的目录下: 之后,在build.gradle(Moudule:app)下添加编译代码:在seting ...

  3. 图解Android Studio导入Eclipse项目源码

    方法/步骤   打开Android Studio,在主页面中选择"File"->"New"->"Import project...&quo ...

  4. Android Studio导入github项目源码步骤

    1.从github上将源码下载下来 2.打开AS,新建一个新项目(我选择了EmptyActivity) 3.先不要在AS 中打开源码,来整理源码 在源码的目录下面,将project下的build.gr ...

  5. 关于Android Studio 3.2 运行应用时提示 “Instant Run requires that the platform corresponding to your target device (Android 7.0 (Nougat)) is installed.” 的说明

    点击"Run",运行App后,Android Studio显示如图1-1界面: 图1-1 这是因为你连接的外部设备(比如Android手机或AVD)的SDK版本在你的电脑上没有安装 ...

  6. Decompiled .class file,bytecode version:51.0(Java 7) Source for 'Android API 23 Platform' not found

    今天在Android Studio中访问Java源码的时候,代码上方出现如下提示: 而且方法体中显示介样内容: throw new RuntimeException("Stub!" ...

  7. Android基础之在Eclipes中关联SDK源码和查看SDK源码

    在进行Android应用开发的时候,我们有时候需要查看某个类或接口的源码从而了解如何去使用一个类或者实现一个接口,查看源码有助于我们的学习某个封装的类的底层是如何实现的,这样可以帮助我们掌握类或者接口 ...

  8. Android Studio导入Android 4.4.4r1的源码

    本文博客地址:http://blog.csdn.net/qq1084283172/article/details/70339471 一.环境配置 1.ubuntu 14.04.5 x64bit 2.j ...

  9. Android 7.1.1系统源码下载、编译、刷机-Nexus 6实战

    想成为一位合格的Android程序员或者一位Android高级工程师是十分有必要知道Android的框架层的工作原理,要知道其工作原理那么就需要阅读Android的源代码. 想要阅读Android的源 ...

随机推荐

  1. swiftTools

    String+Exten.swift // // String+Exten.swift // swiftTest // // Created by napiao on 15/11/27. // Cop ...

  2. 【考虑周全+数学变形】【11月赛】Is it a fantastic matrix?

    Is it a fantastic matrix? Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/ ...

  3. LINQ 基本子句之三 let

    let子句,可以作为临时变量储存表达式的结果,但是let子句一旦初始化后无法再次进行更改. 1. static void Main(string[] args) { string[] names = ...

  4. 简单随笔——如何在gridview的页脚显示信息。。。。

    我是超级大菜鸟...哈哈 先上图看看是不是你需要的 第一步,右击gridview,在事件中,单击RowdataBond事件. 在这之前一定要记得在gridview属性中的ShowFooter设置为“t ...

  5. c++如何生成随机数

    一.使用rand()函数 头文件<stdlib.h> (1)  如果你只要产生随机数而不需要设定范围的话,你只要用rand()就可以了:rand()会返回一随机数值, 范围在0至RAND_ ...

  6. mysql学习(补充)

    修改表名 rename table olderName to newerName; \c 结束不执行 设置字符集 set names gbk; mysql类型 数值型 属性修饰符 zerofill u ...

  7. 一个纯CSS DIV天气动画图标【转扒的】

    <p> </p> <style><!-- /* SUNNY */ .sunny { -webkit-animation: sunny 15s linear i ...

  8. php 记住密码自动登录

    当我们登录网站管理后台的时候,会有提示说记住登录状态,记住我等这样的提示,这个选项有什么用呢?如果选中了记登录状态后,下次在浏览这个网站后 台时就不用在填写用户名和密码了,在去登录了.下面写了一小代码 ...

  9. ecos3.0编译 if_lancepci.c:528: 错误: 赋值运算的左操作数必须是左值

    /home/xin/ecos3/ecos-3.0/packages/devs/eth/amd/lancepci/v3_0/src/if_lancepci.c:528: 错误: 赋值运算的左操作数必须是 ...

  10. swift笔记05

    数组的定义: var 北京十号线 = ["国家图书馆","巴沟"] 北京十号线.count    //或者数组的长度 var a = [Int]() //创建一 ...