Android Studio使用中遇到的问题解决方法

2018-04-28  本文已影响0人  半黑月缺

1 sdk source已经下载却加载不出来

比如D:\Android\sdk\sources 中已经下载了android-27,但在项目中打开某个java 类却不显示源码。

解决方法:找着Android Studio配置中的jdk.table文件,发现里面没有对应的sdk配置。拷贝别的sdk版本配置更改版本号为27就可以了。
比如:C:\Users\xiao.AndroidStudio3.0\config\options\jdk.table
中对应的层级添加了:

<jdk version="2">
  <name value="Android API 27 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-27/android.jar!/" />
        <root type="simple" url="file://D:/Android/sdk/platforms/android-27/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-27" />
      </root>
    </sourcePath>
  </roots>
  <additional jdk="1.8" sdk="android-27" />
</jdk>

2 Android Studio调整Code的行间距

Setting>Editor>Color&Fonts>Font>Line spacing

上一篇 下一篇

猜你喜欢

热点阅读