我试图在IntelliJ中打开一个2.4项目,但由于事情发生了变化,我不知道该怎么做.
在以前的版本中,我可以运行
activator idea
Run Code Online (Sandbox Code Playgroud)
或者使用激活器UI并单击生成intelliJ项目,但在2.4中,idea命令似乎不存在
[error] Not a valid command: idea (similar: eval, alias)
[error] Not a valid project ID: idea
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: idea (similar: clean)
[error] idea
[error] ^
Run Code Online (Sandbox Code Playgroud)
UI似乎坏了,当我点击生成intelliJ项目时,它试图编译应用程序并给出这个错误:
play/Play$
java.lang.NoClassDefFoundError: play/Play$
Use 'last' for the full log.
Failed to load project.
Run Code Online (Sandbox Code Playgroud)
我使用play java模板从头开始创建项目:
activator new
Run Code Online (Sandbox Code Playgroud)
我也尝试将该文件夹导入为项目,但是intelliJ似乎并未将其标识为项目
intellij-idea playframework typesafe-activator playframework-2.4
我正在使用IntelliJ 12,我正在尝试配置我的项目,为我在其中的每个主要方法生成一个jar文件.我有一个项目,一个服务器的主方法和客户端的另一个项目,我想生成一个jar文件,将相应地运行每个
一个不同的SO问题引导我这样:http://blog.jetbrains.com/idea/2010/08/quickly-create-jar-artifact/ 使用一个main方法创建一个jar工作正常但是当我创建多个时每个人工制品都有正确的设置,然后单击"应用",它们都指向同一个主类.
因此,自从添加新的Room android架构库以来,这已经开始发生.我遇到了AppDatabase_Impl不存在的问题,我通过将kapt添加到注释中来修复:
我有其他错误,我怀疑是由于AS,Kotlin和Java 8,所以我尝试更新到AS 3.0
我在尝试构建时遇到以下错误:
Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:compileDebugSources, :app:compileDebugAndroidTestSources, :app:compileDebugUnitTestSources, :cryptocurrency-icons:generateDebugSources, :cryptocurrency-icons:mockableAndroidJar, :cryptocurrency-icons:generateDebugAndroidTestSources, :cryptocurrency-icons:compileDebugSources, :cryptocurrency-icons:compileDebugUnitTestSources, :cryptocurrency-icons:compileDebugAndroidTestSources]
Error:Circular dependency between the following tasks:
:app:compileDebugKotlin
+--- :app:dataBindingExportBuildInfoDebug
| \--- :app:compileDebugKotlin (*)
\--- :app:kaptDebugKotlin
\--- :app:dataBindingExportBuildInfoDebug (*)
(*) - details omitted (listed previously)
Information:BUILD FAILED in 1s
Information:1 error
Information:0 warnings
Information:See complete output in console
Run Code Online (Sandbox Code Playgroud)
我的gradle文件看起来像:
项目gradle
// Top-level build file where you can add configuration options common to …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 scala json 库 Circe,将其包装在一个简单的特征中,以提供与 json 之间的转换,我有以下内容:
import io.circe.generic.auto._
import io.circe.parser._
import io.circe.syntax._
trait JsonConverter {
def toJson[T](t : T) : String
def fromJson[T](s: String) : T
}
case class CirceJsonConverter() extends JsonConverter{
override def toJson[T](t: T): String = t.asJson.noSpaces
override def fromJson[T](s: String): T = decode[T](s).getOrElse(null).asInstanceOf[T]
}
Run Code Online (Sandbox Code Playgroud)
这样做的目的是简单地能够使用任何对象调用 JsonConverter 并将其转换为 json 或从 json 转换为这样jsonConverter.toJson(0) must equalTo("0"),但是当我尝试编译它时,我得到以下结果:
[error] could not find implicit value for parameter encoder: io.circe.Encoder[T]
[error] override def toJson[T](t: T): String = t.asJson.noSpaces
[error] ^
[error] …Run Code Online (Sandbox Code Playgroud)