机器人工作室0.4.2 +摇篮+ Android源$ C ​​$ C [英] android studio 0.4.2 + gradle + Android Source code

查看:176
本文介绍了机器人工作室0.4.2 +摇篮+ Android源$ C ​​$ C的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想装上Android源$ C ​​$ C我使用的是Android Studio的摇篮项目。现在的问题是,该SDK的标签并不重要,如果您使用的是摇篮的项目出现,我不能附加源$ C ​​$ C。我试着用0.4.3版本并不起作用。

I'm trying to attach the android source code to my gradle project using Android Studio. The problem is that the SDK tab does not appear if you are using a gradle project and I can not attach the source code. I tried with version 0.4.3 and does not work.

任何想法或工作,以防万一?

Any idea or work arround?

编辑:我附上我的项目结构捕获没有SDK选项

I've attach a capture with my project structure without sdk option.

感谢您,

推荐答案

简短的解释是,Android的工作室增加了一些功能,以尝试自动管理的IntelliJ软件开发工具包;如果你给它一个JDK路径和Android SDK路径项目结构> Android SDK中,它会自动创建一个Java SDK和Android的SDK您安装在每个API级别你的Andr​​oid SDK。问题是,如果它创建一个Android SDK的不具有下载源代码,如果你去到 SDK管理器API级别的更高版本以及下载源代码,它不会挑选起来更新其SDK。我已经申请<一href="https://$c$c.google.com/p/android/issues/detail?id=65230">https://$c$c.google.com/p/android/issues/detail?id=65230为了这。在这种错误我列出两种解决方法,我将在这里解释:

The short explanation is that Android Studio has added some functionality to try to automatically manage IntelliJ SDKs; if you give it a JDK path and Android SDK path in Project Structure > Android SDK, it will automatically create a Java SDK and Android SDKs for each API level you have installed in your Android SDK. The problem is, if it creates an Android SDK for an API level that doesn't have the sources downloaded, if you go into SDK Manager later and download the source, it doesn't pick that up and update its SDK. I've filed https://code.google.com/p/android/issues/detail?id=65230 for this. In that bug I list two workarounds, which I'll explain here:

您可以真正得到的的SDK 的面板,您正在寻找。我们将其隐藏,如果你有一个摇篮为基础的项目开放,因为我们希望摇篮为基础的项目用户不必担心,但由于我们还支持使用其内部生成器的IntelliJ式的项目,它仍然可以访问它,这些用户将能够使他们的项目工作。您可以在此面板得到,如果您访问项目结构没有项目开放。要做到这一点:

You can actually get at the SDKs panel you're looking for. We hide it if you have a Gradle-based project open since we want Gradle-based project users to not have to worry about it, but since we also support IntelliJ-style projects that use its internal builder, it's still possible to access it so those users will be able to make their projects work. You can get at this panel if you access Project Structure without a project open. To do so:

  • 在关闭所有打开的项目
  • 欢迎到Android工作室的屏幕上,转到配置> 项目默认值> 项目结构> < B>的SDK
  • 选择你安装源相应的Andr​​oid API的SDK,并转到 SOURCEPATH 面板
  • preSS在 + 按钮,并选择源目录。
  • Close all open projects
  • From the Welcome to Android Studio screen, go to Configure > Project Defaults > Project Structure > SDKs
  • Choose the appropriate Android API SDK that you installed source for, and go to Sourcepath panel
  • Press the + button, and choose the source directory.

如果您在下面的麻烦,让我知道,我可以张贴的截图。

If you're having trouble following that, let me know and I can post screenshots.

另一种方法是吹走所有的Andr​​oid Studio的自动创建的SDK,让它重建它们。要做到这一点

Another approach would be to blow away all of Android Studio's auto-created SDKs and let it rebuild them. To do that

  • 退出Android的工作室
  • 删除 jdk.table.xml 的文件,该文件在Mac OS会在你的主目录下的库/ preferences / AndroidStudio preVIEW
  • 在重新开张的Andr​​oid工作室
  • 走进项目结构(无论是从欢迎屏幕或项目),并选择在 Android SDK中标签
  • 确保在 Android SDK中的位置的JDK位置是正确的。
  • Exit Android Studio
  • Delete the jdk.table.xml file, which on MacOS will be in your home directory under Library/Preferences/AndroidStudioPreview
  • Relaunch Android Studio
  • Go into Project Structure (either from the Welcome screen or from a project), and choose the Android SDK tab
  • Make sure the Android SDK location and JDK location are correct.

这篇关于机器人工作室0.4.2 +摇篮+ Android源$ C ​​$ C的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆