如何获得的IntelliJ IDEA 14使用Scala在Android上工作(SBT) [英] How to get IntelliJ IDEA 14 working with Scala on Android (SBT)

查看:548
本文介绍了如何获得的IntelliJ IDEA 14使用Scala在Android上工作(SBT)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Android的SDK-插件使使用Scala使用Android应用SBT。这一般的伟大工程 - 试图将项目导入的IntelliJ IDEA然而,当14.1导入的项目看起来相当空,不承认我的源文件作为项目的一部分

I'm using android-sdk-plugin to make Android apps with Scala using SBT. This generally works great - however when trying to import the project into IntelliJ IDEA 14.1 the imported project looks rather empty and does not recognize my source files as being part of the project.

该文件说:

14的IntelliJ现在包括来自Android的SDK-插件导入项目的原生支持。这个过程通常效果很好,但是还有几个注意事项:
  这个想法-SBT-插件仍然需要实际执行编译(不再需要为IDEA 14.1)

IntelliJ 14 now includes native support for importing projects from android-sdk-plugin. The process generally works well, however there are still several caveats: The idea-sbt-plugin is still required to actually perform the build (no longer necessary as of IDEA 14.1)

克隆和导入即使是最简单的示例项目结果在一个空IDE完全无法显示任何来源:

Cloning and importing even the simplest example project results in an empty IDE not showing any sources at all:

我已经安装了Scala插件和SBT插件作为所要求的文件。(我认为应该不再需要)两者

I have installed both the Scala plug-in and the SBT plug-in (which I believe should no longer be required) as requested by the documentation.

什么重要一步我缺少什么?

What essential step am I missing?

编辑:我添加插件手动项目/ plugins.sbt ,然后跑发电机的Andr​​oid 获得项目/ build.scala 包含对象构建扩展android.AutoBuild

I added the plug-in manually to project/plugins.sbt, then ran gen-android to get a project/build.scala containing object Build extends android.AutoBuild.

推荐答案

缺少的重要步骤是在 Android的插件IDEA的。这似乎是显而易见的,但相对于插件其他框架这一个不只是提供额外的好东西,但实际上是什么的Andr​​oid是至关重要的。

The essential step missing is the Android plug-in of IDEA. This might seem obvious but in contrast to plug-ins for other frameworks this one does not just provide extra goodies but is actually essential for anything Android.

具有插件安装允许选择Android作为一个项目的SDK(这不只是选择一个Android SDK中也是一个Java SDK与它去)。

Having the plug-in installed allows for selecting Android as a Project SDK (which not just selects an Android SDK but also a Java SDK to go with it).

这篇关于如何获得的IntelliJ IDEA 14使用Scala在Android上工作(SBT)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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