2015-12-24 116 views
1

我想導入我已經從intellij從github下載的scala微風項目。intellij錯誤導入scala微風時

我導入爲SBT項目,然後我收到以下錯誤:

14:16:48 SBT project import 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does no... (show balloon) 
14:16:51 Resolver Indexer: Repository is absent or invalid: /Users/donbeo/.m2/repository 

如果我從控制檯使用SBT我能夠建立正確測試

編輯:

我手工製作文件夾

​​

當我從intellij構建我仍然收到e和錯誤:

01:47:28 SBT project import 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does not exist 
     [warn] Credentials file /Users/donbeo/.ivy2/.credentials does no... (show balloon) 
01:49:00 Compilation completed with 31 errors and 0 warnings in 5s 723ms 
01:49:10 Compilation completed with 31 errors and 0 warnings in 1s 852ms 
01:52:31 Compilation completed with 31 errors and 0 warnings in 1s 465ms 


/Users/donbeo/Documents/scala_code/breeze/macros/src/test/scala/breeze/macros/arityizeTest.scala 
Error:(13, 6) too many arguments for constructor arityize:()breeze.macros.arityize 
    @arityize(5) 
    ^
Error:(14, 83) not found: value x 
    class Foo[@arityize.replicate T](@arityize.replicate x: T @arityize.relative(x)) { 
                       ^
Error:(14, 83) recursive value x needs type 
    class Foo[@arityize.replicate T](@arityize.replicate x: T @arityize.relative(x)) { 
                       ^
Error:(18, 19) not found: type Foo2 
    val foo = new Foo2[Int, String](x1=3, x2 = "Foo") 
       ^
Error:(18, 37) not found: value x1 
    val foo = new Foo2[Int, String](x1=3, x2 = "Foo") 
            ^
Error:(18, 43) not found: value x2 
    val foo = new Foo2[Int, String](x1=3, x2 = "Foo") 
             ^
Error:(24, 81) recursive value x needs type 
    def foo[@arityize.replicate T](@arityize.replicate x: T @arityize.relative(x)) = (x: @arityize.relative(foo)) 
                       ^
Error:(24, 110) recursive method foo needs result type 
    def foo[@arityize.replicate T](@arityize.replicate x: T @arityize.relative(x)) = (x: @arityize.relative(foo)) 
                              ^
Error:(23, 6) too many arguments for constructor arityize:()breeze.macros.arityize 
    @arityize(5) 
    ^
Error:(26, 12) not found: value foo2 
    assert(foo2(1, 2) === 2) 
     ^
Error:(35, 6) too many arguments for constructor arityize:()breeze.macros.arityize 
    @arityize(10) 
    ^
Error:(37, 121) recursive value t needs type 
     def apply(workSize1: Int = 1, workSize2: Int = 1, workSize3: Int = 1)(@arityize.replicate t: T @arityize.relative(t)):Unit = { 
                                 ^
Error:(44, 9) not found: type CuKernel2 
    new CuKernel2[Int, String](1, Array()).apply()(1, "2") 
     ^
Error:(48, 6) too many arguments for constructor arityize:()breeze.macros.arityize 
    @arityize(2) 
    ^
Error:(50, 82) recursive value t needs type 
     def apply(workSize1: Int = 1)(@arityize.replicate t: T @arityize.relative(t)):Unit = { 
                       ^
Error:(56, 151) recursive method getKernel needs result type 
    def getKernel[@arityize.replicate T](name: String, blockDims: Array[Int] = Array(32, 1, 1)): (CuKernel[T @arityize.replicate ] @arityize.relative(getKernel)) = { 
                                        ^
Error:(55, 6) too many arguments for constructor arityize:()breeze.macros.arityize 
    @arityize(2) 
    ^
Error:(57, 64) missing arguments for method getKernel; 
follow this method with `_' if you want to treat it as a partially applied function 
     new (CuKernel[T @arityize.replicate ] @arityize.relative(getKernel))(name, blockDims) 
                  ^
Error:(68, 40) not found: type Tuple 
    implicit def tuple[V] : LiteralRow[Tuple[V @arityize.repeat] @arityize.relative(tuple),V] = new LiteralRow[Tuple[V @arityize.repeat] @arityize.relative(tuple),V] { 
            ^
Error:(68, 85) recursive method tuple needs result type 
    implicit def tuple[V] : LiteralRow[Tuple[V @arityize.repeat] @arityize.relative(tuple),V] = new LiteralRow[Tuple[V @arityize.repeat] @arityize.relative(tuple),V] { 
                        ^
Error:(67, 6) too many arguments for constructor arityize:()breeze.macros.arityize 
    @arityize(6) 
    ^
Error:(68, 112) not found: type Tuple 
    implicit def tuple[V] : LiteralRow[Tuple[V @arityize.repeat] @arityize.relative(tuple),V] = new LiteralRow[Tuple[V @arityize.repeat] @arityize.relative(tuple),V] { 
                              ^
Error:(69, 28) not found: type Tuple 
     def foreach[X](tup : Tuple[V @arityize.repeat] @arityize.relative(tuple), fn : ((Int,V) => X)) = { 
         ^
Error:(75, 79) not found: value __order__ 
     def length(tup : Tuple[V @arityize.repeat] @arityize.relative(tuple)) = __order__ 
                      ^
Error:(75, 24) not found: type Tuple 
     def length(tup : Tuple[V @arityize.repeat] @arityize.relative(tuple)) = __order__ 
        ^
Error:(80, 6) too many arguments for constructor arityize:()breeze.macros.arityize 
    @arityize(22) 
    ^
Error:(81, 42) not found: type Tuple 
    case class TupleToDenseVector(tuple: Tuple[Any @arityize.repeat] @arityize.relative(TupleToDenseVector)) 
             ^
Error:(81, 89) illegal cyclic reference involving object TupleToDenseVector 
    case class TupleToDenseVector(tuple: Tuple[Any @arityize.repeat] @arityize.relative(TupleToDenseVector)) 
                         ^
Error:(85, 50) recursive method tupleToDenseVector needs result type 
     new (TupleToDenseVector @arityize.relative(tupleToDenseVector)) (tuple) 
               ^
Error:(84, 46) not found: type Tuple 
    implicit def tupleToDenseVector( tuple: Tuple[Any @arityize.repeat] @arityize.relative(tupleToDenseVector) ) = { 
              ^
Error:(83, 6) too many arguments for constructor arityize:()breeze.macros.arityize 
    @arityize(22) 
    ^
+0

很確定這是一個問題。你嘗試過'mkdir/Users/donbeo/.m2/repository'嗎? – dlwh

+0

是否從命令行('sbt compile')編譯? – marios

+0

yes sbt compile運作良好 – Donbeo

回答

0

我安裝了一個新版本的intelliJ,並且有同樣的問題。原來我沒有啓用maven插件。如果你去插件並啓用它們(Maven Integration和Maven Integration Extension),它應該正確地索引一切。 Intellij plugins window