一、Android Studio:DDMS(Tools-->Android-->Android Device Monitor)下的File Explorer文件夹无法访问时解决方案:
打开命令提示符-->输入:adb shell su -c "chmod" 777 /data(查看下一级data目录则输入:adb shell su -c "chmod" 777 /data/data,以此类推)授权
可以发现该File Explorer中已授权的文件就可以查看了。
参考:http://jingyan.baidu.com/article/75ab0bcbccbc21d6864db28f.html
二、Android Studio:导入源码的问题解决
方法体中显示介样内容:
throw new RuntimeException("Stub!");
上方提示这样的错误:
Decompiled .classfile, bytecode version XX(java X)
Sourcesfor'Android API 23 Platform'not found.
解决方法
- window用户
C:\Users\username\.AndroidStudioXXX\config\options\jdk.table.xml
- Mac用户
~/Library/Preferences/AndroidStudioXXX/options/jdk.table.xml
ps:AndroidStudioXXX 如果有多个,选择你正在使用的版本
然后打开。
再然后找到你错误提示的版本信息那部分,如Android API 23 Platform:
<jdk version="2">
<name value="Android API 23 Platform" />
<type value="Android SDK" />
<homePath value="E:\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://E:/Android/sdk/platforms/android-23/android.jar!/" />
<root type="simple" url="file://E:/Android/sdk/platforms/android-23/data/res" />
</root>
</classPath>
<javadocPath>
<root type="composite">
<root type="simple" url="file://E:/Android/sdk/docs/reference" />
</root>
</javadocPath>
<sourcePath>
<root type="composite" />
</sourcePath>
</roots>
<additional jdk="1.7" sdk="android-23" />
</jdk>
再再然后, 找到sourcePath标签:
<sourcePath>
<root type="composite" />
</sourcePath>
- 1
- 2
- 3
下一步,像这个文件里面其他的版本一样,加上一个子标签:
<sourcePath>
<root type="composite" >
<root type="simple" url="file://E:/Android/sdk/sources/android-23" />
</root>
</sourcePath>
- 1
- 2
- 3
- 4
- 5
url里面地址是你的源码的地址
上面的完成以后,保存一下,就可以重启Android Studio了,然后问题就解决了~ps:如果问题没解决就,看一下加的路径有没有问题,或者 格式加错了。