Ensime 没有找到 android 包并给出如下错误:
object android is not a member of package <root>
我在带有 Java 1.6 的 OS X 上使用 sbt 和 sublime-ensime 来尝试一个简单的 android 演示项目。我知道一些类似的问题,例如 this和this,但这些解决方案对我不起作用。
该项目是从模板创建的,如下所示:
g8 jberkel/android-app
我使用生成了 .ensime 文件(如下)
ensime generate
尽管显然列出了所有项目依赖项,但 ensime 仍然找不到 android 类。但是,sbt 编译项目没有问题。
这是有点长的 .ensime 文件——我也尝试过将其简化为基础,但没有成功。
(:subprojects
((:runtime-deps
("/usr/local/android-sdk/platforms/android-14/android.jar"
"/Users/george/.sbt/boot/scala-2.10.0-RC2/lib/scala-library.jar"
"/Users/george/Source/Projects/android-essentials/target/scala-2.10/classes"
"/Users/george/Source/Projects/android-essentials/target/scala-2.10/classes")
:module-name
"android-essentials"
:compile-deps
("/usr/local/android-sdk/platforms/android-14/android.jar"
"/Users/george/.sbt/boot/scala-2.10.0-RC2/lib/scala-library.jar")
:version
"0.1"
:test-target
"/Users/george/Source/Projects/android-essentials/target/scala-2.10/test-classes"
:name
"Android Essentials"
:depends-on-modules
()
:package
"android-essentials"
:target
"/Users/george/Source/Projects/android-essentials/target/scala-2.10/classes"
:source-roots
("/Users/george/Source/Projects/android-essentials/src/main/scala"
"/Users/george/Source/Projects/android-essentials/src/main/java"
"/Users/george/Source/Projects/android-essentials/target/scala-2.10/src_managed/main/java"
"/Users/george/Source/Projects/android-essentials/target/scala-2.10/src_managed/main/scala"
"/Users/george/Source/Projects/android-essentials/src/test/scala"
"/Users/george/Source/Projects/android-essentials/src/test/java"
"/Users/george/Source/Projects/android-essentials/target/scala-2.10/src_managed/test")
:test-deps
("/usr/local/android-sdk/platforms/android-14/android.jar"
"/Users/george/.sbt/boot/scala-2.10.0-RC2/lib/scala-library.jar"
"/Users/george/.ivy2/cache/org.scalatest/scalatest_2.10.0-RC5/jars/scalatest_2.10.0-RC5-2.0.M5-B1.jar"
"/Users/george/Source/Projects/android-essentials/target/scala-2.10/classes"
"/Users/george/Source/Projects/android-essentials/target/scala-2.10/test-classes"))
(:runtime-deps
("/usr/local/android-sdk/platforms/android-14/android.jar"
"/Users/george/.sbt/boot/scala-2.10.0-RC2/lib/scala-library.jar"
"/Users/george/Source/Projects/android-essentials/tests/target/scala-2.10/classes"
"/Users/george/Source/Projects/android-essentials/target/scala-2.10/classes"
"/Users/george/Source/Projects/android-essentials/tests/target/scala-2.10/classes")
:module-name
"android-essentials-tests"
:compile-deps
("/usr/local/android-sdk/platforms/android-14/android.jar"
"/Users/george/.sbt/boot/scala-2.10.0-RC2/lib/scala-library.jar"
"/Users/george/Source/Projects/android-essentials/target/scala-2.10/classes")
:version
"0.1"
:test-target
"/Users/george/Source/Projects/android-essentials/tests/target/scala-2.10/test-classes"
:name
"Android Essentials Tests"
:depends-on-modules
("android-essentials")
:package
"android-essentials-tests"
:target
"/Users/george/Source/Projects/android-essentials/tests/target/scala-2.10/classes"
:source-roots
("/Users/george/Source/Projects/android-essentials/tests/src/main/scala"
"/Users/george/Source/Projects/android-essentials/tests/src/main/java"
"/Users/george/Source/Projects/android-essentials/tests/target/scala-2.10/src_managed/main/java"
"/Users/george/Source/Projects/android-essentials/tests/target/scala-2.10/src_managed/main/scala"
"/Users/george/Source/Projects/android-essentials/tests/src/test/scala"
"/Users/george/Source/Projects/android-essentials/tests/src/test/java"
"/Users/george/Source/Projects/android-essentials/tests/target/scala-2.10/src_managed/test")
:test-deps
("/usr/local/android-sdk/platforms/android-14/android.jar"
"/Users/george/.sbt/boot/scala-2.10.0-RC2/lib/scala-library.jar"
"/Users/george/Source/Projects/android-essentials/tests/target/scala-2.10/classes"
"/Users/george/Source/Projects/android-essentials/target/scala-2.10/classes"
"/Users/george/Source/Projects/android-essentials/tests/target/scala-2.10/test-classes"))))
我的配置有问题,还是 Ensime / Sublime 有问题?